Hey everyone,
I’m working on implementing Host Migration in Unity 6 with a simple Netcode for GameObjects setup. If anyone has solid references, examples, or lessons learned, I’d love to see them.
Here’s my current understanding:
- The most common approach is to use a Lobby (Unity service) to keep track of all connected players.
- When the host disconnects, the Lobby designates a new host.
- The new host ensures it has the latest game/application state, starts its server, and notifies the clients to reconnect.
- To use a Lobby, you must pair it with the Relay transport.
- If your NetworkManager uses Relay, then all communications must flow through it — including NGO messages.
- This requires a separate join code for Netcode for GameObjects (different from the Lobby join code).
That raises a couple of questions:
- Does this mean all NGO traffic (including large messages or streaming data) will be routed through Unity’s servers, potentially adding lag and hurting performance?
- Is there an alternative way to handle host migration that keeps NGO traffic on the local network, while still benefiting from a Lobby-like coordination service? Or does this implementation keep the network traffic on the local network and use the services for the bookkeeping?
Thanks in advance for any insights!
— Blaine