Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug OnLobbyEventConnectionStateChanged is triggering twice.

Discussion in 'Lobby' started by Mj-Kkaya, Apr 12, 2023.

  1. Mj-Kkaya

    Mj-Kkaya

    Joined:
    Oct 10, 2017
    Posts:
    156
    When I left or kick player the lobby,"OnLobbyEventConnectionStateChanged" event is triggering twice.
    It returns "Unsubscribed" value of LobbyEventConnectionState

    I'm not assigning twice, the "OnKickedFromLobby" event would also be run twice if I did.
    Unity : 2022.2.14f1
    Lobby : 1.1.0-pre.4

    Script:
    m_LobbyEventCallbacks = new LobbyEventCallbacks();
    m_LobbyEventCallbacks.KickedFromLobby += OnKickedFromLobby;
    m_LobbyEventCallbacks.LobbyEventConnectionStateChanged += OnLobbyEventConnectionStateChanged;
     
  2. UnityArthurJoly

    UnityArthurJoly

    Unity Technologies

    Joined:
    Aug 9, 2022
    Posts:
    3
    Hello Mj-Kkaya,

    Thank you for your very detailed report !
    We managed to reproduce it, it will be fixed.
     
    Mj-Kkaya likes this.
  3. Mj-Kkaya

    Mj-Kkaya

    Joined:
    Oct 10, 2017
    Posts:
    156
    Thanks.
    This bug also exists in version 2022.2.15f1.
     
  4. UnityArthurJoly

    UnityArthurJoly

    Unity Technologies

    Joined:
    Aug 9, 2022
    Posts:
    3
    Thank you for the added precision, this is a Lobby issue independent of the Editor version.
    When the new version is published, you will be able to update it through the Package Manager on any of those Editor versions.
     
    Mj-Kkaya likes this.