My program is designed to load in textured models from external files. Each time a model is loaded, the previous one is supposed to be removed from memory. However, I've found that each time I load a model, the program's memory usage goes up by about 600-800mb. It never goes back down, it just rises each time a model is loaded until the program is closed. This happens even if a model is loaded that was already previously loaded by the program.
I need to find out what's not getting unloaded, but I'm not sure how to actually go about it. Is there a way to dynamically count the number of textures or meshes currently loaded into a scene? If I had that, I could probably get started on debugging the unloading process myself.
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
88 People are following this question.
Advanced character customization
Unity C# - Load Model/Mesh from database over internet
Multiple meshes and textures for one asset
Is it possible to make various armors on one model?
Modify mesh on load