We need to help regarding the about the memory uses

Hello team,

We have created one demo with texture2D and spriteRender using filled-in the colours. It’s working fine, but it uses a lot of memory.
My current demo app uses more than 18GB of memory.
How can we fix this?

It looks like it’s all coming from texture memory. What size are your textures that you’re getting that absurd an amount of memory usage?

1 Like

What is that?

My hunch is that this is some sort of flood-filling asset to create textures on the fly? If so, these textures are either absurdly large (eg more than 2048x2048) OR the memory grows over time as you are using the app. In that case this would indicate that the textures that are no longer needed aren’t disposed of.

I’ve switched the post to be in the “Unity Engine” category rather than the News.

Also, have you tried using the Memory Profiler package to analyze this in more detail? In it, each texture is not just listed with it’s size but also with important meta information based on its Importer settings or options set via API during the course of their usage. Flags like Read Write enabled for example double the memory usage as a main thread CPU accessible copy of the texture data needs to be retained for reading and writing.

1 Like