I’m a little confused on what’s going on with Unity when I load a new scene, and I’m not really sure what the best practices are for keeping memory usage and load times down.
At the beginning of each of my scenes, I’m using Resources.Load to load a lot of different prefabs into memory. Many of these are repeated between the different scenes. Is it better to store these as prefabs in a “DontDestroyOnLoad” object and just reference them this way rather than use lots of Resources.Loads in each scene? Or does this not make much of a difference?
I also have to instantiate a lot of objects at runtime at the start of a level due to the game world being procedurally generated. This takes a bit of time to load. Would there be some way to keep this stuff in memory and place them into a new level more quickly, maybe using a pooling system?
Furthermore, is there anything else you’d recommend that I do when entering a new scene to ensure that it loads more quickly and keeps memory usage down?