我有这个代码,它适用于我的Mac,但它不适用于Android。知道为什么吗?
void StoreHighscore(int newHighscore)
{
int oldHighscore = PlayerPrefs.GetInt (name, 0);
if (newHighscore > oldHighscore) {
PlayerPrefs.SetInt (name, newHighscore);
PlayerPrefs.Save ();
Debug.Log ("Highscore " + newHighscore);
}
}