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.


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’ :slight_smile: