The question is answered, right answer was accepted
Using PlayerPrefs to store string but it won't update on my UI
I'm using a development build of my game to do this.
DifficultyManager Script:
MenuHandler Script:
Hierarchy:
I want to know why my currentDifficultyText
isn't updating when the game loads. When the game initially loads, it checks in PlayerPrefs
to see if there is a difficulty string saved and if there is, set the currentDifficulty
to the difficulty saved by the PlayerPrefs
. If there isn't a difficulty saved, then it sets a default difficulty of normal and then that should update the text...
Answer by EcoGamesOrig · Feb 21, 2019 at 02:38 PM
Okay, I fixed my problem! I realized when I woke up this morning that I had to use a StartCoroutine
function to activate the ChangeDifficultyText
IEnumerator function.