Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Third Party Photon. OnRoomListUpdate doesn't work after restart WI-FI on Android

Discussion in 'Multiplayer' started by R0tmayer, Jun 13, 2021.

  1. R0tmayer

    R0tmayer

    Joined:
    Mar 13, 2021
    Posts:
    12
    PUN2.31 Photon lib: 4.1.6.0
    Unity 2019.4.26f1

    Hello dear friends!

    I have a simple app with rooms. Master creates room, client can join room, client can leave room. If master leaves room client leaves room too. Its ok, its working. (for example Master - UnityEditor, client - AndroidBuild).

    When the master creates a room, an callbacks OnRoomListUpdated is triggered for the client correctly.

    But if client in lobby and he disconnected from server, then he connected to server, all callbacks is working correctly (OnConnectedToMaster, OnJoinedLobby e.t.c) its ok.


    Code (csharp):
    1.  
    2. Debug.Log("Client IsConnected = " + PhotonNetwork.IsConnected);
    3. Debug.Log("Client InLobby = " + PhotonNetwork.InLobby);
    These logs are true when client reconnected.

    But now, if master creates room, client can't join because OnRoomListUpdated callback is not triggering.

    Can anyone help or know some reasons of this problem?

    Here is a link to video of my problem (at the end of video I restarted WI-FI):
     
  2. R0tmayer

    R0tmayer

    Joined:
    Mar 13, 2021
    Posts:
    12
    Master and client had different AppVersion.

    Mistake in my code. This part of code I wrote in Awake, but had to write this in callback OnConnectedToMaster

    Code (CSharp):
    1. PhotonNetwork.GameVersion = Application.version;
     
  3. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
    Glad you found it. Thanks for the update.