Example #1
0
 // Start is called before the first frame update
 void Start()
 {
     if (SceneManager.GetActiveScene().buildIndex == 0)
     {
         int highscore = PlayerPrefsController.GetHighscore();
         GetComponent <TextMeshProUGUI>().text = highscore.ToString("00000");
     }
     else
     {
         int currentscore = PlayerPrefsController.GetCurrentScore();
         GetComponent <TextMeshProUGUI>().text = currentscore.ToString("00000");
     }
 }