Hello Guys!
I am facing problem of getting rooms list. I have tried everything I read all the other questions related to topic but none of them helped me out. How can I get rooms created in game. Here is the that I have written. Any help would be appreciated.
I am facing problem of getting rooms list. I have tried everything I read all the other questions related to topic but none of them helped me out. How can I get rooms created in game. Here is the that I have written. Any help would be appreciated.
public GameObject RoomBoardEntry;
public GameObject RoomBoardPanelParent;
// Update is called once per frame
void Update () {
foreach (RoomInfo room in PhotonNetwork.GetRoomList()) {
Debug.Log (room.Name+ " Name ");
GameObject RoomObject = (GameObject)Instantiate (RoomBoardEntry);
RoomObject.transform.SetParent (RoomBoardPanelParent.transform);
RoomObject.transform.Find ("NameHeader").GetComponent<Text> ().text = room.name;
}
}