I have a little project that uses photos downloaded from a server as textures for each game level. The object stays the same, but each level downloads a smallish 100-400Kb jpg image.
While looking at the profiler in XCode, running the app on the iPad, it’s obvious that each time an image is downloaded, memory usage increases 20-30Mb. After about 7 images, the app will quit (receiving memory warnings along the way).
How can I free up the memory after I’m done with each image (texture) I’ve downloaded? I don’t see the textures in the hierarchy during gameplay in Unity, so I’m not sure how to reference them for Destroy.
A similar issue happened, my Android phones at most support 4GB memory per app using it. But for one of my Unity project, it requires at most 7GB memory, and yes, most of the memory usage is because the texture loaded in the memory. But now I am wondering if two objects are using the same texture, will the memory usage be twice of the one object case? Or just be twice?