Well, I have a tutorial screen in my game… The first level is designed so that messages pop up and notify the player about how to play and all the game controls… Well, For some reason, I can’t seem to do that as the second button never shows up…
var ShowTut=true;
var ShowTut1=false;
function OnGUI()
{
if(ShowTut)
{
GUI.backgroundColor = Color.black;
GUI.contentColor = Color.white;
if(Input.GetKeyDown(KeyCode.H) || GUI.Button(Rect(20,640,370,80), "Tutorial Message 1"))
{
ShowTut = false;
ShowTut1 = true;
print("Tutorial Screen 1 Closed. Player Requested.");
}
}
if(ShowTut1)
{
GUI.backgroundColor = Color.black;
GUI.contentColor = Color.white;
if(Input.GetKeyDown(KeyCode.H) || GUI.Button(Rect(20,640,370,80), "Tutorial Message 2"))
{
ShowTut1 = false;
print("Tutorial Screen 2 Closed. Player Requested.");
}
}
}