Save System and Spawn Objects Manager
Posted: Sat Feb 26, 2022 2:10 pm
Hi Tony!
Digging into the Save System i already set up all data saving except object instantiation at runtime.
Im wondering the best way to set this up because my game is composed by a village main scene and many (many) objects will be spawning and despawning at runtime, or additive scenes being loaded and unloaded.
Lets say each gameobject/scene holds -stages-.
A stage is like a chapter or event, and is a gameobject/scene that holds all gameobjects related to the event (timelines + binded gameobjects) and gets loaded or instantiated as the game progresses, then unloaded or destroyed.
Question is:
- Whats the best way to use the Spawn Objects Manager without it holding an inmense list with all possible runtime gameobjects. It is hard having all of them and be able to correctly debug/manage them in editor and avoid missing one.
- Can object managers be nested? So i have a global manager and then when restoring -stage- gameobjects, have inside other managers?
I understand this is a broad, implementation-related matter. I wanna know the limits and best use for the manager, so im also reading the base code, but maybe you can provide better insight.
Thank you for your constant support Tony.
Digging into the Save System i already set up all data saving except object instantiation at runtime.
Im wondering the best way to set this up because my game is composed by a village main scene and many (many) objects will be spawning and despawning at runtime, or additive scenes being loaded and unloaded.
Lets say each gameobject/scene holds -stages-.
A stage is like a chapter or event, and is a gameobject/scene that holds all gameobjects related to the event (timelines + binded gameobjects) and gets loaded or instantiated as the game progresses, then unloaded or destroyed.
Question is:
- Whats the best way to use the Spawn Objects Manager without it holding an inmense list with all possible runtime gameobjects. It is hard having all of them and be able to correctly debug/manage them in editor and avoid missing one.
- Can object managers be nested? So i have a global manager and then when restoring -stage- gameobjects, have inside other managers?
I understand this is a broad, implementation-related matter. I wanna know the limits and best use for the manager, so im also reading the base code, but maybe you can provide better insight.
Thank you for your constant support Tony.