Search Unity

Resolved Check if host disconnects

Discussion in 'Netcode for GameObjects' started by lavagoatGG, Apr 15, 2023.

  1. lavagoatGG

    lavagoatGG

    Joined:
    Apr 16, 2022
    Posts:
    229
    How can I check on a client if the host of the game disconnects?
    Is there another way than creating a coroutine and check "NetworkManager.Singleton.IsConnectedClient"?
    Also how to create a new game with same players and another host if the host disconnects?
     
  2. RikuTheFuffs-U

    RikuTheFuffs-U

    Unity Technologies

    Joined:
    Feb 20, 2020
    Posts:
    440
    There are callbacks that will tell you when you disconnected (I.E: OnClientStopped in NGO 1.4.0 )

    You're looking for a thing called "host migration", which NGO doesn't support yet.

    Does this answer help?
     
    lavagoatGG likes this.
  3. lavagoatGG

    lavagoatGG

    Joined:
    Apr 16, 2022
    Posts:
    229
    Yes, thank you!
     
    RikuTheFuffs-U likes this.