On my main main I have a title animation using Texture2D[ ]. I found that the number of textures I was using would cause the game to quit to the home screen on the iPad 1 when it was set to load the last level played. If it was set to go to the main menu, the game works fine.
I reduce the number of textures in the animation, and it worked from there, however, one person has complained the game still quit on them. They may have had a ton of apps open and not had enough available ram.
What’s the best way to clear those textures from memory before loading a level so it frees up ram?
for (int i = 0; i < myTex2D.Lengh; i++)
{
myText2D = null; } Resources.UnloadUnusedAssets; Set textures reference to null, then call UnloadUnusedAssets. I use this for an app that requires six 2048x2048 textures to be unloaded in a fairly time critical manner before loading something new and it works without any issues on an iPad1.
Hi Eem, I’m looking into freeing up memory as well but I’m not too sure how to approach it. Can you explain how your code works? Since you assigned textures to arrays, does that mean you’re swapping textures whenever you unload the resource?