public FtueInformation LoadFtueInformation()
        {
            FtueInformation ftue = new FtueInformation();

            if (HasFtueData)
            {
                JsonUtility.FromJsonOverwrite(FtueData, ftue);
                return(ftue);
            }

            return(ftue);
        }
        public FtueInformation LoadFtueInformation()
        {
            FtueInformation ftue = new FtueInformation();

            if (HasFtueData)
            {
                JsonUtility.FromJsonOverwrite(FtueData, ftue);

                print($"[PREFS] [FTUE] LOADED ftue data: {FtueData}");
                Crashlytics.Log($"Loading FTUE information - {FtueData}");

                return(ftue);
            }

            return(ftue);
        }
        //private void MigrateToVersion1(GlobalSettings settings)
        //{
        //    print("Test migrate ");

        //    // TODO: If players have made it past the new level cap (405), scale back their progress?

        //    if (HasPlayerData)
        //    {
        //        print("Migrate - has player data");

        //        string[] data = PlayerData.Split(',');

        //        string[] playerName = data[(int)PlayerDataType.Name].Split(':');
        //        playerName[1] = playerName[1].Trim('"');

        //        string[] playerGuid = data[(int)PlayerDataType.Guid].Split(':');
        //        playerGuid[1] = playerGuid[1].Trim('"');

        //        string[] coins = data[(int)PlayerDataType.Coins].Split(':');
        //        string[] hints = data[(int)PlayerDataType.Hints].Split(':');
        //        string[] stars = data[(int)PlayerDataType.Stars].Split(':');

        //        // old version of player data had puzzle index at position 7
        //        string[] mainPuzzleIndex = data[7].Split(':');

        //        Player player = new Player();

        //        string levelProg = BlankLevelInfo(settings);

        //        player.Name = playerName[1];
        //        player.Guid = playerGuid[1];
        //        player.Coins = coins[1].ParseToInt();

        //        player.Hints = hints[1].ParseToInt();
        //        player.Stars = stars[1].ParseToInt();
        //        player.IsNew = false;
        //        player.GroupIndex = 0;
        //        player.CurrentLevelInGroupIndex = 0;

        //        // assign new puzzle index

        //        int puzzleIndex = mainPuzzleIndex[1].ParseToInt();
        //        //player.MainPuzzleIndex = mainPuzzleIndex[1].ParseToInt();

        //        if (puzzleIndex >= 200)
        //        {
        //            puzzleIndex = 200;
        //        }
        //        else if (puzzleIndex < 200 && puzzleIndex > 6)
        //        {
        //            Mathf.RoundToInt(puzzleIndex / 2);
        //        }

        //        player.MainPuzzleIndex = puzzleIndex;

        //        player.NewLocation = false;
        //        player.FtuePassed = player.MainPuzzleIndex > 6;     // only set ftue as passed if player is past level 6
        //        player.LevelProgress = levelProg;

        //        if (player.FtuePassed)
        //        {
        //            for (int i = 0; i < settings.LevelOrderSettings.RuleSettings.Length; i++)
        //            {
        //                settings.LevelOrderSettings.RuleSettings[i].IsFtue = false;
        //            }
        //        }
        //        else // cancel ftue flags on games that players have completed
        //        {
        //            for (int i = 0; i < player.MainPuzzleIndex; i++)
        //            {
        //                settings.LevelOrderSettings.RuleSettings[i].IsFtue = false;
        //            }
        //        }

        //        PersistPlayerProgress(player);
        //    }
        //}

        private void MigrateToVersion2(GlobalSettings settings)
        {
            print("[TEST] migrating to version 2");

            PlayerPrefs.DeleteAll();

            FtueInformation ftue = new FtueInformation();

            Player player = new Player();

            player = CreateDefaultPlayer(settings);

            PersistPlayerProgress(player);
            PersistFtue(ftue);

            return;
        }
 public void PersistFtue(FtueInformation ftue)
 {
     //TODO: Add ftue information validation step
     FtueData = JsonUtility.ToJson(ftue);
     print($"[PREFS] [FTUE] SAVED ftue: {FtueData}");
 }
 public void PersistFtue(FtueInformation ftue)
 {
     FtueData = JsonUtility.ToJson(ftue);
     print($"[PREFS] [FTUE] SAVED ftue: {FtueData}");
     Crashlytics.Log($"Persist FTUE progress - {FtueData}");
 }