I’m trying to make a tablike GUI when you click on a different button a different menu will appear.So the buttons work i checked with Debul.Log but nothing appears on the screen.I will really appreciate if someone helps me with this cause I don’t know what is the problem.Here’s a sample of the code :
//////////////////////////////////////////////////////////////////////////////////////////////////
//GUI tab for the Room Game List//////////////////////////////////////////////////////////////////
if(GUI.Button(new Rect(Screen.width*0.02f,Screen.height*0.02f,width , height),"Room List" )){
GUI.Box(new Rect((Screen.width)*0.1f, (Screen.height)*0.08f, Screen.width*0.39f, Screen.height*0.6f),"as");
GUILayout.BeginArea(new Rect((Screen.width )*0.1f, (Screen.height)*0.1f, Screen.width*0.5f, Screen.height*0.8f));
Debug.Log("List of rooms");
GUILayout.Label(PhotonNetwork.GetRoomList() + " currently available. Join either:");
// Room listing: simply call GetRoomList: no need to fetch/poll whatever!
this.scrollPos = GUILayout.BeginScrollView(this.scrollPos);
foreach (RoomInfo roomInfo in PhotonNetwork.GetRoomList())
{
GUILayout.BeginHorizontal();
GUILayout.Label(roomInfo.name + " " + roomInfo.playerCount + "/" + roomInfo.maxPlayers);
if (GUILayout.Button("Join"))
{
PhotonNetwork.JoinRoom(roomInfo.name);
}
GUILayout.EndHorizontal();
}
GUILayout.EndScrollView();
GUILayout.EndArea();
}
//////////////////////////////////////////////////////////////////////////////////////////////////////
//The GUI tab for creating a custom game ////////////////////////////////////////////////////////////
if(GUI.Button(new Rect(Screen.width*0.1f,Screen.height*0.02f,width , height),"Custom Game" )){
GUILayout.BeginArea(new Rect((Screen.width )*0.1f, (Screen.height)*0.1f, Screen.width*0.5f, Screen.height*0.8f));
GUILayout.BeginHorizontal();
Debug.Log("Custom GAME");
if(GUI.Button(new Rect(120,100,scene1.width,scene1.height), scene1)){
this.SceneNameGame="Scene";
}
GUILayout.EndArea();
}
Everything else is appearing as normal -labels , boxes , other buttons but not these guys.