I don’t know, how to make the gui.button to disappear when i tap on the gui.button.
Like when i push a button i want to create a textfield where you can type in the Username, like a Login.
Can someone to tell me, how to type the code in C#. like a sample.
You can do it by using a bool.
bool UsernameInput = false;
Rect rect = new Rect(0,0,100,25);
string userName = "";
void OnGUI()
{
if(UsernameInput)
{
userName = GUI.TextField(rect,userName);
}
else
{
if(GUI.Button(rect,"Log in"))
{
UsernameInput = true;
}
}
}