I have searched for an hour looking for somebody who explains how to do this in Javascript. I need to show and hide my text objects by the press of a button and here is my current code. I need something similar to .enabled or .setactive but I get errors from both of them.
.setactive only seems to work for objects because I get the error that setactive and enabled are not apart of UI.Text.
My varibles are defined as
var woodText : UI.Text;
My key pressing code
if(showGUI == true)
{
inventoryPanel.SetActive(true);
Time.timeScale = 0;
}
if(showGUI == false)
{
inventoryPanel.SetActive(false);
Time.timeScale = 1;
}
}
Thank you so much, I could not find that in the documentation or anywhere!
– Ian-McCleary