Pls, how can I make a button that is visible in visible in my scene
thanks in advance
- Should be on ‘Scripting’.
- You mean something like this?:
void OnGUI()
{
if(visible == true)
{
if(GUI.Button(new Rect(0,0,32,32), "button"))
{
visible = !visible;
}
}
}
This question belongs in a difference part of the forum.
I think people need more info. Are you using Unity’s GUI system, NGUI, or what?
But I think with most things in unity, including Unity’s GUI, you can do gameObject.SetActive(false) to hide it if you don’t want updates to happen while it’s hidden.