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

Question Detect host disconnection on the clients

Discussion in 'Relay' started by KadaXuanwu, Aug 16, 2022.

  1. KadaXuanwu

    KadaXuanwu

    Joined:
    Oct 26, 2019
    Posts:
    9
    Hello everyone,

    I want to implement a logic for the clients to handle the case for when the host disconnects. I read host migration in the docs https://docs.unity.com/relay/host-migration.html, but I don't understand how step one "Detect if the host player disconnects prematurely" can be achieved.
    The NetworkManager.Singleton.OnClientDisconnectCallback is not called on the clients when the host disconnects. Is there another callback for that case, or how can the clients know?

    Thanks for your help.
     
    Last edited: Aug 17, 2022
  2. AsifNaeem

    AsifNaeem

    Joined:
    Apr 12, 2016
    Posts:
    29
    I am currently exploring solutions for migrating hosts to alternative clients in the event of disconnection. However, it appears that the relay service lacks this particular feature.