예제 #1
0
    public static void ClearUserData()
    {
        if (EditorApplication.isPlaying)
        {
            _log.Error($"Cannot delete during play mode.");
        }
        else
        {
            GameSaves.RefreshSavedGames();

            if (GameSaves.SaveExists("Default"))
            {
                GameSaves.UnloadCurrent();
                GameSaves.DeleteSave("Default");
            }
            else
            {
                _log.Warning("No game save data to delete.");
            }

            var user = UserSaves.LoadUser("Default");

            if (user.HasRegisteredGame("Default"))
            {
                user.UnregisterGame("Default");
            }
            else
            {
                _log.Warning("No game to unregister.");
            }

            UserSaves.SaveUser();
        }
    }
예제 #2
0
    private void StartGame()
    {
        GameSaves.RefreshSavedGames();
        GameSaves.LoadGame("Default");

        if (!GameSaves.HasSavedData)
        {
            StartCoroutine(HandlePrologueScreen());
        }

        InitializeScene();
    }