- Home /
Question by
scottfredeman · Sep 08, 2011 at 02:22 PM ·
variableshiding
Hiding a Variable from Displaying in a Table
Hello,
I am having trouble hiding a variable in my Scoreboard. The Variable still displays in my Scoreboard display table. Is there anything else I need to add to either if these lines to force it to display nothing? I do not want to show the "-900". Thank you in advance! Scott
private var myHiddenVariable : int = -900;
PlayerPrefs.SetInt(scoreBoardIndex+"leaderBoardScore"+i,myHiddenVariable);
Comment
So your code runs though all the different variables in your scoreboard and set them to the PlayerPrefs?
If you don't want to show a value you could have an array that stores whether it is visible or not and then read that array when you display your score board. If an index in that array is set to 'not visible' the array simply doesn't display it.