and I found that "UnityEngine.Mesh" and "UnityEngine.Material" objects keep increasing everytime I load into one of my levels. At first I thought it was something I did so I used the same script above in the KitchenSink demo level and kept loading into it and noticed that it also wasn't being freed. Any ideas on what's causing this?
You can actually just use the profiler instead of the script:
I was using this script to check for memory leaks in my game:
http://wiki.unity3d.com/index.php?title=DetectLeaks
and I found that "UnityEngine.Mesh" and "UnityEngine.Material" objects keep increasing everytime I load into one of my levels. At first I thought it was something I did so I used the same script above in the KitchenSink demo level and kept loading into it and noticed that it also wasn't being freed. Any ideas on what's causing this?
You can actually just use the profiler instead of the script: