public static void SaveStarsCountForLevel() { _userProfile.ChangePointsBy(scoresValue); PlayerPrefs.SetInt("UserScore", _userProfile.GetPoints()); int starsCount = GetStarsCount(); string starsKey = GetStarsInfoKey(_levelIndex); if (PlayerPrefs.GetInt(starsKey) < starsCount) { PlayerPrefs.SetInt(starsKey, starsCount); } }