The saver is definitely present only once in the scene and in the save file, and the call stack is directly from SaveSystem:
Code: Select all
BlackForest.VillageSaver:ApplyData (string) (at Assets/0_game/Scripts/Savers/VillageSaver.cs:119)
PixelCrushers.SaveSystem:ApplySavedGameData (PixelCrushers.SavedGameData) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:674)
PixelCrushers.SaveSystem/<LoadSceneCoroutine>d__111:MoveNext () (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:785)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
I'm staring at the source and can't for the life of me figure out why it is calling ApplyData() two times. The two calls have the same timestamp, but from my debug output I see that the first one is applied entirely before the second one is called, so they're called one after the other, not in parallel.
Also, the debug output from line 770 in SaveSystem.cs:
Code: Select all
if (debug) Debug.Log("Save System: Loading scene " + savedGameData.sceneName +
Code: Select all
ApplySavedGameData(savedGameData);
I suspect the culprit somewhere near Line 674. For whatever reason the SaveSystem thinks it has this saver twice, maybe?
My custom saver is set up with Append Saver Type true and Save Across Scene Changes true.