Yo World!
I’ve made a GUI that has some buttons, and a sound attached to it. For some reason when I start the game, it opens all the subwindows and even plays the sounds, how do I stop it from doing this on startup?
function OnGUI ()
{
GUI.Box(Rect(Screen.width/2-133, 5, 266, 50),"");
if (GUI.Button(Rect(Screen.width/2-128,10,40,40),Interface_Hotbar_Image_01))
{
audio.PlayOneShot(Interface_Hotbar_Sound_01);
audio.Play();
if(Interface_01_Displaying)
Interface_01_Displaying = false;
else
Interface_01_Displaying = true;
}
if(Interface_01_Displaying)
{
Interface_01_Window = GUI.Window (1, Interface_01_Window, Interface_01_Settings, "");
}
//...
}
Thanks Man... It worked for me!!!
– Did