- Home /
Question by
iboreyiz · Oct 26, 2020 at 11:21 AM ·
unity 2dplayerprefs
PlayerPrefs Not Working On Mobile Device,PlayerPrefs Not Work On Android Devices
When I try my mobile game on unity , i can see my score where I get from another scene with PlayerPrefs.
But when I try this game on a mobile phone it's not shows up. I try many thing but can't fix it. Is there any solution for this problem ?
SCENE 1
private float topScore = 0.0f;
public Text scoreText;
public Text startText;
scoreText.text = "Score: " + Mathf.Round(topScore).ToString();
PlayerPrefs.SetString("CurrentScore", scoreText.text);
SCENE 2
public Text OverScore;
void Start()
{
OverScore.text = PlayerPrefs.GetString("CurrentScore");
}
Comment
Your answer
Follow this Question
Related Questions
Save values on different objets with same script? 1 Answer
Player Prefs not saving 0 Answers
How to save different values with same script? 1 Answer
Name not saving to or loading from PlayerPrefs 1 Answer
How can I save my game data 1 Answer