public void LoadProfile(string prefix) { this.Name = PlayerPrefs.GetString(string.Format("{0}.Name", prefix)); this.ID = PlayerPrefs.GetInt(string.Format("{0}.ID", prefix)); this.Password = PlayerPrefs.GetString(string.Format("{0}.Password", prefix)); this.BestScore = new GameStatistics(); this.BestScore.Load(string.Format("{0}.BestScore", prefix)); int unsynchronizedScoresCount = PlayerPrefs.GetInt(string.Format("{0}.UnsynchronizedScoresCount", prefix)); for (int index = 0; index < unsynchronizedScoresCount; index++) { GameStatistics gameStatistics = new GameStatistics(); gameStatistics.Load(string.Format("{0}.UnsynchronizedScore{1}", prefix, index)); this.UnsynchronizedScores.Add(gameStatistics); } }