I am wanting to be able to hit “B” and a gui come up with buttons inside. Can someone help me in doing this?
#pragma strict var buttonName :String; private var act :boolean; var closeOnButton :boolean; //Should it close again when you press b? function Start () { } function Update () { if(Input.GetKeyDown(buttonName)){ if(closeOnButton){ if(act){ act = false; }else act = true; }else{ act = true; } } } function OnGUI(){ if(act){ GUI.Box(Rect(Screen.width / 4, Screen.height / 4, Screen.width / 2, Screen.height / 2), ""); //Background Box GUI.Button (Rect(Screen.width / 4 + 15, Screen.height / 4 + 15, Screen.width / 2 - 30, Screen.height / 4 - 15), "A Button here. Just add more if u want"); } }