Code: Select all
public class SplashScreenLogic : MonoBehaviour
{
public string startScreen;
public float splashScreenDuration;
// Start is called before the first frame update
void Start()
{
StartCoroutine(ShowSplashScreenForDurationThenLoad(splashScreenDuration));
}
private IEnumerator ShowSplashScreenForDurationThenLoad(float seconds) {
yield return new WaitForSeconds(seconds);
if (SaveSystem.HasSavedGameInSlot(0)) {
SaveSystem.LoadFromSlot(0);
} else {
SceneManager.LoadScene(startScreen);
}
}
}
I shortened the "bytes" portion of the error is much longer for sanity.Dialogue System: Lua code '{"bytes":[84,0,0,0,0,16,0,0,0,83,6,80,108,97,121,101,114,84,0,0,0,0,4,0,0,0,83,4,78,97,109,101,83,6,80,108,97,121,101,114,83,8,80,105,99,116,117,114,101,115,83,2,91,93,83,11,68,101,115,99,114,105,112,116,105,111,110,83,0,83,8,73,115,80,108,97,121....<truncated>
UnityEngine.Debug:LogError(Object)
PixelCrushers.DialogueSystem.Lua:RunRaw(String, Boolean, Boolean) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Lua/Lua Wrapper/Lua Interpreter/Lua.cs:226)
PixelCrushers.DialogueSystem.Lua:Run(String, Boolean, Boolean) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Lua/Lua Wrapper/Lua Interpreter/Lua.cs:127)
PixelCrushers.DialogueSystem.DialogueSystemSaver:ApplyDataImmediate() (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Save System/DialogueSystemSaver.cs:57)
PixelCrushers.SaveSystem:ApplyDataImmediate() (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:717)
PixelCrushers.<LoadSceneCoroutine>d__97:MoveNext() (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:694)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr) (at /Users/builduser/buildslave/unity/build/Runtime/Export/Scripting/Coroutines.cs:17)
It seems like there may be an issue with Lua running the DialogueSystemSaver data, but I'm not sure. I've attached my DialogueSystemSaver component & DialogueSystemController persistent settings for reference.