- Home /
Profiler has HideFlags.DontSave Assets taking up 86mb [What is this?]
Hello, so I'm having a problem with using a lot of memory.
In the profiler I can see that HideFlags.DontSave Assets is using 86.8mb
Beyond that Texture2D is using 85.4mb of this. How can I figure out what textures these are?
If I expand the textures they don't have a name, just a size and reason.
The first 8 say:
[blank name] 10.7mb Object is marked Don't Save. (Must be explicity...).
Now I know about the Don't Save flag. I went into ALL my scripts and checked for it, nothing in any of my scripts use it.
Plus this is on a texture, how can a texture be not save? And my guess is it automatically did this.
Now I did some digging around and my guess is this is the terrain? Now I think this because I have 8 terrains. How are these using so much memory? I mean not only is it using 10.7mb per terrain in this DontSave but it's using 2.7mb on the SplatAlpha which is crazy large as well. I'd love to lower the resolution on the SplatAlpha if possible too.
AND under TerrainData each terrain is using 1.3mb.
Thanks.
I am currently investigating a very similar issue on a scene with several Terrain tiles. I suspect the LOD terrain patches to be the culprit, as there exist 2000+ objects, all of similar (30k) size.
These terrain objects have been generated at runtime (rather than in the editor), so I am wondering if there is a default flag somewhere in the terrain creation process we are missing.
Did you get any further with your investigation of the issue?
On closer inspection, after creating a small test scene, the HideFlags.DontSave assets under '$$anonymous$$esh' appear to be the terrain LOD patches.
Answer by MachindoApps · Sep 25, 2013 at 11:24 AM
These are the Terrain LOD patches as they are created (and destroyed) at runtime for the terrain objects in your scene.
If you set a low pixel error, and watch the value in the inspector, you will see the memory usage increase. If you lower the pixel error, you will see the memory usage drop back down.
You will see the same behaviour if you start distant from the terrain, and move closer towards it. The memory usage will raise. If you then move back out away from the terrain, the memory usage will reduce back down.
This is as a result of the higher-res terrain geometry patches being allocated and deallocated by Unity's Terrain LOD implementation. This is not a bug, this is 'working as intended' :-)