Why does't it get the roomlist when a new client join a lobby?
Options
DCores
✭
My code is follow:
after joined the lobby,the client will create a room to wait other player join autolly
in normally, when another player join the same lobby called MarLobby,
OnRoomListUpdate will be called and get the exist rooms
now, the problem is that "when another player join the same lobby called MarLobby, but OnRoomListUpdate can't get the first player craeted rooms, the room count is 0"
why? and how to fix the problem? thank u for any reply
public override void OnConnectedToMaster() { base.OnConnectedToMaster(); Debug.Log("LaunchNetMgr OnConnectedToMaster"); if(ConnectedToMasterEvent != null) { ConnectedToMasterEvent(); } //加入Mar大厅 TypedLobby typedLobby = new TypedLobby(); typedLobby.Name = GlobalParam.Ins.lobbyName; //lobbyName is MarLobby typedLobby.Type = LobbyType.SqlLobby; PhotonNetwork.JoinLobby(typedLobby); }when OnConnectedToMaster is called,join a custom lobby called MarLobby
after joined the lobby,the client will create a room to wait other player join autolly
in normally, when another player join the same lobby called MarLobby,
OnRoomListUpdate will be called and get the exist rooms
now, the problem is that "when another player join the same lobby called MarLobby, but OnRoomListUpdate can't get the first player craeted rooms, the room count is 0"
why? and how to fix the problem? thank u for any reply
0
Comments
-
by the way
the code works normal before,it can't work normal from today0 -
and i open 2 clients in the same computer0
-
ok
the problem is fixed by "connect a same region when OnRegionListReceived is called, and use PhotonNetwork.ConnectToRegion("rue"); to connect the same region"0