Host Migration in Multiplayer Game which uses Lobby, Relay and Netcode for Gameobjects

Hi,

I am using Netcode for Gameobjects framework for multiplayer game, lobby and Relay for connection, but when host disconnects/left the other clients are also left/disconnects from that session.

What I wanted is when host disconnects/lefts from the session, one of the clients from the session should be the host and get authorities which host have.

Currently, I am not able to find out correct solution/examples and API for same. Please help/guide if I am missing something.

Thanks in Advance.

Last version I used had no host migration and I don‘t think it has landed yet. You may want to check the roadmap.

Hi,

Thank you for reply.

I am using below versions:

  • Unity Editor Version: 2022.3.4f1
  • Netcode for gameobjects version: 1.5.1
  • Lobby service: 1.0.3
  • Relay service: 1.0.5

Is there any way/concept to implement the Host Migration with above version?

I just wanted to ask the same question as you @Dhanashree_Vinherkar
For the clients it will be really bad if the host disconnects, and they will not be very happy about it.

Hello @Dhanashree_Vinherkar and @TruckerJoe ,

NGO doesn’t have host migration but you can build you own solution. We cover this very briefly in in the Relay docs and in the Lobby docs. You would need to sync gameplay-crucial netvars and do a host role transfer (it wouldn’t be seamless though).

@NelsonChristensen 's explanation of his own solution may give some more insights.

Hope this helps!