Quantcast
Channel: Photon Unity Networking (PUN) — Photon Engine
Viewing all articles
Browse latest Browse all 8947

Facing Problems in getting roomlist in unity photon networking

$
0
0
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.

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;
         }
     }

Viewing all articles
Browse latest Browse all 8947

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>