![how to use unity assets bundle extractor for texture data how to use unity assets bundle extractor for texture data](https://www.gamepretty.com/wp-content/uploads/2021/07/unnamed-file-260-770x366.png)
These all are examples of wrong assumptions most game developers make regarding Unity memory management and asset unloading.Īnd these assumptions might have somewhat nasty consequences. “What the f*** is going on here?”, you curse aloud.
![how to use unity assets bundle extractor for texture data how to use unity assets bundle extractor for texture data](https://answers.unity.com/storage/attachments/94676-page2.png)
![how to use unity assets bundle extractor for texture data how to use unity assets bundle extractor for texture data](http://www.devxdevelopment.com/UnPackerPage2.png)
You’re furious to see that nothing changed in your memory layout. You profile again and aren’t happy to see the sprites are still in memory.Īnd the last one: you call Addressables.Release(myInstance) on an addressable asset.The user returns to the game and you unload that additive scene.All its sprites are loaded, and that’s fine. You additively load a scene that contains the pause menu UI.However, the memory taken by that prefab didn’t come back and your internal dialog says “shitty editor”. You even go as far as to remove the original reference to the prefab to make sure it’s removed from memory. Your player kills them and then you destroy all these instances.Unity Memory Management: Asset Unloading Assumptions If you’re aware of this fact, this issue will rarely be a concern.īut if you’re not, then you might run into confusion and/or trouble. “ That must be wrong, I’m destroying my game object instances“, they tell me.Īnd here’s what I usually answer: “ sorry, destroying instances won’t necessarily get your memory back“. Here’s what I see in most profiles: an increasing amount of used RAM and a confused developer asking me why.