Trouble with saving

Announcements, support questions, and discussion for Quest Machine.
cptscrimshaw
Posts: 113
Joined: Sun Sep 20, 2020 8:21 pm

Re: Trouble with saving

Post by cptscrimshaw »

If I'm going to add this to my own scene loading code, will I need to do anything with the save system component as it sits currently, since it's already loading/unloading scenes automatically? That's really the part I wasn't sure of.
User avatar
Tony Li
Posts: 22108
Joined: Thu Jul 18, 2013 1:27 pm

Re: Trouble with saving

Post by Tony Li »

Probably not, although you may want to untick the Save System component's Save Current Scene checkbox. Here's a list of the scene change-related operations in SaveSystem to help you identify if you need to do anything special:
  • SaveSystem.LoadScene(X): Unloads other scenes and loads scene X.
    Similar to SceneManager.LoadSceneAsync(Single).
  • SaveSystem.LoadAdditiveScene(X): Additively loads scene X.
    Similar to SceneManager.LoadSceneAsync(Additive).
  • SaveSystem.UnloadAdditiveScene(X): Unloads an additively-loaded scene X.
    Similar to SceneManager.UnloadSceneAsync(X).
  • SaveSystem.UnloadAllAdditiveScenes(): Unloads all scenes previously loaded by LoadAdditiveScene().
  • SaveSystem.SaveToSlot(#): If Save System component's Save Current Scene is ticked, records the name of the current active scene.
  • SaveSystem.LoadFromSlot(#): If Save Current Scene is ticked, calls SceneManager.LoadSceneAsync(name, Single).
Post Reply