I am currently profiling my game and trying to do some memory management. I have a lot of objects in my game that are memory pooled during the loading of the level. When I don't need objects they are set to inactive and upon reloading i activate all of them back again. This also minimizes the loading time for my game. I see that memory is not being freed for obvious reasons, as I am not destroying any objects. So I want to know if I should destroy unwanted objects or calling Resources.UnloadUnusedAssets after deactivating objects will unload all the textures and other memory used by them? Any help is appreciated. Thanks.
↧