public void TickDontApplyLuaNextLoadLevel() { FPSyncLuaPlayerOnLoadLevel sync = DialogueManager.Instance.GetComponent <FPSyncLuaPlayerOnLoadLevel>(); if (sync != null) { sync.dontApplyLuaNextLoadLevel = true; } }
private void RestartGame() { Debug.Log("Restarting game"); FPSyncLuaPlayerOnLoadLevel syncOnLoad = DialogueManager.Instance.GetComponent <FPSyncLuaPlayerOnLoadLevel>(); if (syncOnLoad != null) { syncOnLoad.dontApplyLuaNextLoadLevel = true; } PersistentDataManager.LevelWillBeUnloaded(); DialogueManager.ResetDatabase(DatabaseResetOptions.RevertToDefault); Application.LoadLevel(0); }