using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class HighscoreText : MonoBehaviour { Text highscore; void OnEnable() { highscore = GetComponent(); highscore.text = PlayerPrefs.GetInt("HighScore").ToString(); } }