The title is a little confusing, but I want to have two texts displaying the player high score, one when he pauses the game, and the other displaying the hi score in the game over screen.
I made it work by the only way I currently know, but I guess its not a convenient and efficient way to do it. Script:
public class LevelManager : MonoBehaviour {
public static LevelManager instance;
public Pause pauseScript;
public GameObject gameOverText;
public Text scoreText;
public Text highScore;
public Text highScore2;
private int score = 0;
void Start() {
highScore.text = PlayerPrefs.GetInt("HighScore", 0).ToString();
highScore2.text = PlayerPrefs.GetInt("HighScore", 0).ToString();
}
If you know the proper cleaner way to set it up, I appreciate it. Thank you in advance, have a great year