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

Alert Host when Guest suddenly exits the match

Discussion in 'Multiplayer' started by dyfer, Dec 11, 2016.

  1. dyfer

    dyfer

    Joined:
    May 6, 2013
    Posts:
    6
    Hi,

    I have a one to one UNET multiplayer match running on Unity 5.4 with a NetworkLobbyManager.
    Now I just want that when the Guest phone crashes or he his kicked out of the match for some unexpected reason, the Server knows about it and can properly move to another scene or get an alert.

    For now I tried some overrides in my custom NetworkLobbyManager but it seems that OnLobbyServerDisconnect is never called whereas OnLobbyClientDisconnect works just fine.

    Is there a reason why OnLobbyServerDisconnect isn't triggered when the Guest suddenly exits a running match ?

    The Documentation says :
    OnLobbyServerDisconnect
    This is called on the server when a client disconnects.

    Any help is welcome
    Thanks!