Quantcast
Channel: Questions in topic: "playerprefs"
Viewing all articles
Browse latest Browse all 1333

Unity PlayerPrefs Doesn't work,

$
0
0
Hi, the playerprefs doesnt work in my project. Where am I making mistakes i dont know. Could you check this code? using UnityEngine; using UnityEngine.UI; public class Dice : MonoBehaviour { public Text score; public Text highScore; void start() { highScore.text = PlayerPrefs.GetInt("HighScore", 0).ToString(); } public void RollDice () { int number = Random.Range (1, 7); score.text = number.ToString(); PlayerPrefs.SetInt("HighScore", number); } } ,

Viewing all articles
Browse latest Browse all 1333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>