Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

garbage collection not cleaning up material that isn't referenced on android

$
0
0
I have a game with two scenes, **menu** and **game**. When jumping from the scene **menu** to **game** on Android one of the textures used in **menu** isn’t removed from memory. However, this problem does not appear when doing the same thing in the editor. When using the memory profiler on the Android I can see that the texture has one reference to one material but that material itself does not have any references. This is a big problem for me as this texture is the largest one in the game (NGUI atlas for the menus). When the memory gets full I get a big spike due to garbage collection but the texture is still not being removed. Only thing I can think of is that the material might be referenced in a static variable by the NGUI plugin and maybe that’s why it doesn’t show any references? Any other ideas? Or ideas for solution or workaround?

Viewing all articles
Browse latest Browse all 171066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>