memory problem

I dont get it. :frowning: My game uses about 52MB ram and I dont know whats going wrong. I have opimized all the stuff that I know of. All textures are PVRTC compressed (about 2 1024x1024 textures and ~20 128x128 textures…thats it). I’m playing a 1,3MB mp3 music track compressed into iPhone background music. And I’m using 2 skinned meshes with some animations. The textures are already included in the stuff I mentionend before. That is nothing special I guess?

Mmhh, the more I look into the object allocation performance tool monitor the lesser I understand whats going on and what is eating my memory.

So I did an export from the tool (in CSV) and uploaded it here: http://www.fancy-factory.com/object_allocation_csv.zip
I REALLY appreciate any help as this memory problem is driving me nuts! Thanks! :slight_smile:

16mb is the base for the unity engine + mono

so realistically you have 36mb

Did you ensure to set all textures to NOT have “GetPixels” activated?
Otherwise copies of the textures are kept within RAM even though they aren’t needed.

But the rest of the data there clearly point towards you having massive arrays with stuff in because 1 MP3 and the textures don’t explain the amount of memory used.

Sure you don’t have asset bundles or alike?

Thanks for your suggestions, dreamora!

Yes, that’s what I’m expecting too. :frowning:

I never used that and - from the object allocation snapshot - it does not seems textures are eating the memory. So I guess its not the textures fault. But I may be wrong.
Maybe a clue: if I start the game the material’s of most of the mesh’s used are “instanced”. I still have to figure out why. But, if an instance from a material is created, will the texture used by this material be instanced (copied) as well?

I’m using no arrays but several good filled C# List’s of gameobjects, but a list creates no copy of an object as far as I know?

Yes I’m sure, the project contains only my stuff.