Hi,
I'm having a really weird bug. Just recently I changed the game flow to start offlineMode = true, and later offlineMode = false and connect.
I've searched around and did everything I can find.
1. Start game offlineMode = true. Spawn player
2. At some point, destroy the player in local, and have tried all (combination) of the following, in various order:
4. In OnConnectedToMaster, I have a coroutine to debug a few things:
5. When JoinRandomRoom is called, it fails with message: No Match found. It seems it doesn't consider countOfRooms, instead only GetRoomList. Why are they not the same in the first place?
If I never set offlineMode and adjusted the flow to straight away connect, everything works as expected.
I've been on this problem for a few hours, don't know what else to do but ask here...
Cheers
I'm having a really weird bug. Just recently I changed the game flow to start offlineMode = true, and later offlineMode = false and connect.
I've searched around and did everything I can find.
1. Start game offlineMode = true. Spawn player
2. At some point, destroy the player in local, and have tried all (combination) of the following, in various order:
PhotonNetwork.LeaveRoom();3. Then a button to call ConnectUsingSetting or ConnectToRegion(what it was originally).
PhotonNetwork.Disconnect();
PhotonNetwork.offlineMode = false;
PhotonNetwork.networkingPeer.State = ClientState.Disconnected;
4. In OnConnectedToMaster, I have a coroutine to debug a few things:
Debug.Log(PhotonNetwork.countOfRooms);This is the weird part: countOfRooms is 1, while GetRoomList.Length is 0 (Another client is already online and joined room. The countOfRoom 1 is definitely that one, because it's 0 when there's no other client). Btw, inRoom is false, State: ConnectedToMaster
Debug.Log("Room list count: " + PhotonNetwork.GetRoomList().Length);
Debug.Log("InRoom: " + PhotonNetwork.inRoom);
Debug.Log("State: " + PhotonNetwork.connectionStateDetailed);
5. When JoinRandomRoom is called, it fails with message: No Match found. It seems it doesn't consider countOfRooms, instead only GetRoomList. Why are they not the same in the first place?
If I never set offlineMode and adjusted the flow to straight away connect, everything works as expected.
I've been on this problem for a few hours, don't know what else to do but ask here...
Cheers