I can't setup the map :/
Options
string[] roomPropsInLobby = { "map", "gamemode"};
roomPropsInLobby[0] = PropiertiesKeys.SceneNameKey;
ExitGames.Client.Photon.Hashtable prop= new ExitGames.Client.Photon.Hashtable() { { "map", 1} };
prop[PropiertiesKeys.SceneNameKey] = m_scenes[CurrentScene].m_SceneName;
RoomOptions roomOptions = new RoomOptions() { isVisible = IsVisiblee.isOn, maxPlayers = 11, isOpen = true, prop};
PhotonNetwork.CreateRoom(MatchName.text, roomOptions, TypedLobby.Default);
roomPropsInLobby[0] = PropiertiesKeys.SceneNameKey;
ExitGames.Client.Photon.Hashtable prop= new ExitGames.Client.Photon.Hashtable() { { "map", 1} };
prop[PropiertiesKeys.SceneNameKey] = m_scenes[CurrentScene].m_SceneName;
RoomOptions roomOptions = new RoomOptions() { isVisible = IsVisiblee.isOn, maxPlayers = 11, isOpen = true, prop};
PhotonNetwork.CreateRoom(MatchName.text, roomOptions, TypedLobby.Default);
0
Comments
-
Try this:
// string[] roomPropsInLobby = { "map", "gamemode"}; // roomPropsInLobby[0] = PropiertiesKeys.SceneNameKey; // this will override "map" with PropiertiesKeys.SceneNameKey string string[] roomPropsInLobby = { "map", "gamemode", PropiertiesKeys.SceneNameKey}; //ExitGames.Client.Photon.Hashtable prop= new ExitGames.Client.Photon.Hashtable() { { "map", 1} }; ExitGames.Client.Photon.Hashtable prop= new ExitGames.Client.Photon.Hashtable(); //prop[PropiertiesKeys.SceneNameKey] = m_scenes[CurrentScene].m_SceneName; prop.Add("map", 1); prop.Add(PropiertiesKeys.SceneNameKey, m_scenes[CurrentScene].m_SceneName): RoomOptions roomOptions = new RoomOptions() { IsVisible = IsVisiblee.isOn, MaxPlayers = 11, IsOpen = true}; roomOptions.CustomRoomProperties = prop; roomOptions.CustomRoomPropertiesForLobby = roomPropsInLobby; PhotonNetwork.CreateRoom(MatchName.text, roomOptions, TypedLobby.Default);
here is a similar question.0 -
omg Thank you BRO you saved my life0