Hey. I am trying to increase the performance of my scene and use your very helpful Needle Inspector Extension.
My scenario has hundreds of meshes/buildings, using the same Material āM_Atlasā which uses āT_Atlasā as its BaseColorMap (Shader = UnityGLTF/PBRGraph).
The Inspector lists the material and textures hundreds of times, which causes a very huge memory useage and Iām lacking to understand why.
I thought āM_Atlasā is used as a shared material and therefor instantiated once? Am I missing something fundamental here? Do you have suggestions on how to reduce the amount of texture/material calls?
Thanks in advance,
The Inspector lists the material and texture once per MeshRenderer that references them ā itās a list of references, not unique instances. The memory increase you see is likely from per-object texture copies if the material got cloned (e.g., via per-object overrides or UnityGLTF/PBRGraph shader settings).
Check your MeshRenderers: if any override material instead of sharing sharedMaterial, each gets its own copy. Also, if you have multiple GltfObject components with EmbedSkybox enabled, the skybox texture gets duplicated per export ā disable it on all but one.
The Resources panel (Pro) shows actual memory per texture/geometry ā use that to confirm if the texture is truly duplicated or just referenced many times.
If you can share a URL to the deployed scene, we can take a closer look.
Sources: Needle Engine Docs (63%), Needle Engine Docs (60%)
1 replies left - Become PRO for more replies.
Reply to this post directly if you need further help (bottom right button)
Hi, do you have a link to this website?
The inspector lists unique instances held into memory by something - but it doesnt mean theyāre currently used for rendering (e.g. if you have instancing enabled the original materials might still be there but not used for rendering).
Seeing the Atlas texture there hundreds of times looks concerning. Altough one more caveat that might not be covered correctly in the inspector: an texture could share the underlying image data so even tho it exists hundreds of times the memory footprint might not be as big as it appears.
Note: The Inspector itself doesnt hold references in memory - everything it shows is using Weakrefs/Weakmaps - that means if the website isnt referencing the asset anymore it disappears from the list.
Update:
Right now itās not easy to spot (and thatās the issue you probably face above) if the Texture object is actually unique with āper textureā memory cost OR if the image data is actually shared and you only pay that memory cost once.
Right now the only way to see that is in the āimage source uuidā - if that uuid is the same it means the data is shared (even if itās not the same it might be shared) - Iām working on improving this so it is clearly shown in the list!