I'm working on a Unity/NGUI application that supports devices with various resolutions. We've created atlases of several resolutions (Standard Def, High Def, etc.) and all of our user interface sprites use a reference atlas. The reference atlas is initially set to use a Standard Def atlas as its replacement. When the app starts, it detects the device's resolution, loads a higher-resolution atlas if necessary, and then switches the reference atlas to use the new atlas as its replacement. All of this works fine, for the most part...
However, we've noticed that the game does not unload the original Standard Def atlas (and its accompanying large texture) after switching to the new higher-definition atlas. We'd like to be able to reclaim this memory.
We tried several ways to unload the atlas before posting to the forum. Here is what we tried, all of which didn't work:
* Calling Resources.UnloadUnusedAssets()
* Calling sprite.MarkAsChanged() on all sprites, and then calling Resources.UnloadUnusedAssets()
* Calling Resources.Unload() on the atlas's texture and material
In conclusion, is there some known way to unload an NGUI asset?
Thanks for your time.
A. T. Campbell, III