Subscene keep changes over Loads/Unloads

Hello Eveyone,

im trying to implement Destructables in my game, so i need to keep changes done to subscenes during a game instance. (modifications/destructions of entities)
is this already implemented in the current subscene behavior or i need to implement it my self ?

If YES, how to do it, if NO what is the best approach to do it?

Thank you!

What do you mean with keeping changes? You want to re-save the subscene to disk? Have the changes stay there between scene loads?

When the subscene is loaded from disk the entities are in memory, and you are free to delete or do whatever you want to them. You want those changes to persist the next time you load the subscene?

eg:
i have a scene map with 20 subscenes, these subscenes are loaded and unloaded depending on player position, if some of destactable entities are destroyed during the current game session, and player goes far then returns, does reloaded subscenes will load the modified data or the default one ?

1 Like

Ok gotcha, that makes sense. My gut feeling would be to separate your static map assets from the dynamic ones that can be destroyed. The static ones you can load/unload (and even different LOD versions), but keep the dynamic ones always active.

Or alternatively come up with a way of saving a state for each tile when it gets unloaded, and restore that when it gets loaded again.

Btw just curious have you tried this yet to see what happens?

1 Like