Hello,
Sorry if my question had been asked before. I've run into some memory problem I've noticed when developing for some older iOS device.
My game has several atlases, one main UI atlas, and some scene specific atlases for different scenes. The NGUI version I'm using is 3.0.9f2
When I do some profiling in Unity & XCode I've noticed when changing into scenes which uses different atlas, the memory usage keeps increasing,
until eventually the app crashed on weaker old devices.
When I run a profiler in Unity I've noticed that the unused atlas still has references even though no objects are currently using that atlas in the current scene.
Specifically it says ManagedStaticReferences in the profiler (didn't really understand what that mean).
My atlas usage flow is something like this :
Atlas -> atlas assigned to Reference Atlas Prefab -> prefab assigned to various UISprites in Scene (reference atlas prefab is there to make it easier for changing between SD / HD Atlas source)
I've also tried to create a clean project to test this case with a simpler flow where atlas are assigned directly to UISprites, and it is still not cleaned when changing scenes.
I've tried using Resources.UnloadUnusedAsset() and System.GC.Collect(), but it seemed to have no effects, most likely because there's still some references to the atlas.
Is this a problem with NGUI / Unity, or am I doing something wrong with how I design my usage flow?