Forum rules - please read before posting.

How save remember for non in scene objects

Hi!

I'm facing this issue, I have a remember script (remember collider for example), I change the collider state during gameplay, then I switch scene without saving. I call a save inside the new scene, the state of first object is not saved after a load or coming back to its scene.
There is a way to keep states of remembers and save it indipentely if they are loaded at the moment?

Thank you

Comments

  • Sorry, I'm not 100% clear. Are you looking for Remember components to save their data in scenes that aren't open?

    That should already be the case. When you switch scene, Remember component data will be stored in a temporary buffer, and then that data is included in the save-game file.

    You can get a raw list of exactly what data is saved, and in which scene, from the Save-game File Manager at the top of the Settings Manager.

    If you save the game after switching scene, you should find the Remember data from the first scene is included - is it not there, and what are your AC/Unity versions? The data in the Manager can be copied to Json if you'd like to paste it here.

  • Hi Chris!

    Yes it's exactly what I mean, which script managed this buffer? Because we use a custom loading system probably I have to integrate and call this buffer before change scene

  • Unopened scene data is stored in LevelStorage.

    Tutorials on saving custom data can be found here and here.

  • So if I call KickStarter.levelStorage.StoreAllOpenLevelData(); before change scene it will be fine?

  • That will be called automatically already - provided you're using AC to switch scene.

    Are you using the Scene: Switch Action to change scene? If you're switching scene through code, use AC's ChangeScene function instead of Unity's own scene-opening functions to have AC save the scene for you:

    AC.KickStarter.sceneChange.ChangeScene (sceneIndex / sceneName);
    
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.