SaveSystem load doesn't load, only resets scene
Posted: Tue Dec 24, 2024 5:19 pm
I've set up the save system following the "Dialogue System for Unity 2.x Save System" Youtube tutorial, so I have Save System, Json Data Serializer, Player Prefs Saved Game Data Storer and Dialogue System Saver on the Dialouge Manager. I have a pause menu with Save and Load buttons, which are calling SaveSystem.SaveToSlot(0); and SaveSystem.LoadFromSlot(0); respectively.
Saving seems to work because PlayerPrefs updates to the right DS variables when I check after saving. But LoadFromSlot just resets the scene and all the variables are set to initial states.
Here's the console message on load:
I don't know if it's important, but Player Prefs Saved Game Data Storer Saved Games is empty while in the video it showed a save file. Using 22.2.49 in Unity 2022.3.13.
Saving seems to work because PlayerPrefs updates to the right DS variables when I check after saving. But LoadFromSlot just resets the scene and all the variables are set to initial states.
Here's the console message on load:
Code: Select all
Save System: Loading scene GossipMode
UnityEngine.Debug:Log (object)
PixelCrushers.SaveSystem/<LoadSceneCoroutine>d__135:MoveNext () (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:1023)
UnityEngine.MonoBehaviour:StartCoroutine (System.Collections.IEnumerator)
PixelCrushers.SaveSystem:LoadGame (PixelCrushers.SavedGameData) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:990)
PixelCrushers.SaveSystem:LoadFromSlotNow (int) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:831)
PixelCrushers.SaveSystem/<LoadFromSlotCoroutine>d__120:MoveNext () (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:819)
UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr)