com.unity.cloud.gltfast icon indicating copy to clipboard operation
com.unity.cloud.gltfast copied to clipboard

[Request] Filter GLB import parameters to minimize memory allocation

Open pcareyASM opened this issue 8 months ago • 0 comments

I am looking to be able to filter the elements of a glb before I import it, in order to only have to load the meshes I need into memory.

This is largely in relation to an LOD solution. If I have a single GLB that contains three meshes (LOD0, LOD1, LOD2), I would like to be able to specify the mesh I want to import, instead of having to load the whole thing into memry, instantiate it, and then disable the ones I don't want.

I think this is more an issue towards the import process than the actual instantiation. From my understanding, once a GLB has been imported, its meshes etc are already loaded into memory as Unity assets in the GltfImport object. I am hoping to avoid that and only load the meshes I need into memory for an optimal experience.

Regarding specific implementation, I'm open to ideas. This has only just passed my desk as a possible requirement in our project and we're exploring options. I suppose a filter could be built into the GltfImport constructor, or passed as an argument into the Load function. As to the structure of the filter, I am again not sure and I would love to here your opinion.

Thanks in advance, and I'm eager to here your thoughts regarding this!

pcareyASM avatar Apr 11 '25 04:04 pcareyASM