Hi again all!
I’m at a loss here and its driving nuts!
i have two scripts.
The first script has a function in it:
public Text scoreLabel;
public static int totalScore;
public string convertedToString;
public void updateScoreBoard(int amount){
totalScore += amount; //add the amount that was passed to the score
convertedToString = totalScore.ToString("F0");
scoreLabel.text = convertedToString;
}
The second script calls the function:
myGutterCheckScript.updateScoreBoard(200);
My problem is that the variable will not display on the UI text field. It will do it locally if i call the function from the first script but will not update from the second script. Everything is linked as i have printed out the variable though when it gets to the part where it converts it to a string… nothing happens. what gives?
cheers peeps