Guest User

Untitled

a guest
Aug 28th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. public string[] mode;
  2. RoomOptions roomopt;
  3.  
  4. public void makegame(){
  5. roomopt.CustomRoomPropertiesForLobby = mode;
  6. roomopt.CustomRoomProperties = new ExitGames.Client.Photon.Hashtable{{"map","pirateisland"} };
  7. PhotonNetwork.CreateRoom (namefield.GetComponent<Text> ().text, roomopt, TypedLobby.Default);
  8. }
  9.  
  10. // WHILE LOOPING ,IN ANOTHER SCRIPT i get the room property of the room as null
  11. void showgames(){
  12. foreach (RoomInfo room in PhotonNetwork.GetRoomList()) {
  13. Debug.Log(room.customProperties["map"]); // this ALWAYS returns null
  14. if ( room.customProperties["map"] == "pirateisland"){
  15. Debug.log("works");
  16. }
  17. }
Add Comment
Please, Sign In to add comment