- Home /
Question by
jacksonkr · Sep 28, 2019 at 07:22 PM ·
prefabassetsmemorymemory management
Memory Management: Assets between scenes
SceneA and SceneB use a lot of the same prefabs yet I have to reload them when unloading SceneA and loading SceneB. What's a good way to get around this so I'm not reloading assets that will continue to be used once the scenes switch?
Opt 1 - leverage static memory eg SomeClass.instance = this; Opt 2 - leverage a scene that exists strictly to pass assets to from old scenes to new scenes.
Comment
Answer by rahul_95 · Sep 30, 2019 at 10:55 AM
use donotdestroyonload it will keep the gameobjects across scenes