- Home /
Question by
unitiii · Jun 12, 2015 at 02:30 PM ·
c#guitextureguilayoutgui-buttongui.label
how to accomplish:"When click a button , four button occour ."
By unity, I want to get :
When click a button , four buttons occour . So I write codes below :
public string button1 = "" ;
public string button2 = "" ;
public string button3 = "";
void Start()
` ` {
button1="statement1" ;
button2="statement2" ;
button3="statement3" ;
}
void OnGUI()
`` {
` ` if(GUI.Button(new Rect(60,60,100,30),button1))
{
` ` GUI.Button(new Rect(60,60,100,30),button2) ;
GUI.Button(new Rect(60,60,100,30),button3) ;
`` `}
}
when all is ready, and then run this script , the console show some wrong with it. I don't know what's wrong with it and how to accomplish it in unity .
Comment
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
[SOLVED]GUIStyle Word Wrap Check 1 Answer
How to make an inspector window like the Button class? 1 Answer