Quantcast
Channel: Questions in topic: "loadleveladditive"
Viewing all articles
Browse latest Browse all 102

Memory leak with Streaming terrains

$
0
0
I've modified the streaming world example to Work with Unity free on Android basic. It basically uses loadLevelAdditive to load the maps that I've packed into the player, not as AssetBundles. When unloading a Zone, I simply GameObject.Destroy() the root object in that map.
The game runs fine initially but after several levels are loaded and unloaded, the application memory size keeps piling up to an eventual crash. In the original example project, I think AssetBundle is unloaded after every level is loaded additively, taking care of any memory occupied by it. Here, I believe that the level and its objects, like terrain are never unloaded even after I've destroyed everything loaded from that level.
Is there a way solve this issue?
Is it possible to load and unload entire scenes using Resources.Load and Resources.Unload ?

Viewing all articles
Browse latest Browse all 102

Trending Articles



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