Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

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

Discussion in 'Netcode for GameObjects' started by Dhanashree_Vinherkar, Jul 11, 2023.

  1. Dhanashree_Vinherkar

    Dhanashree_Vinherkar

    Joined:
    Jan 3, 2023
    Posts:
    2
    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.
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    4,013
    Last version I used had no host migration and I don‘t think it has landed yet. You may want to check the roadmap.
     
  3. Dhanashree_Vinherkar

    Dhanashree_Vinherkar

    Joined:
    Jan 3, 2023
    Posts:
    2
    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?
     
  4. TruckerJoe

    TruckerJoe

    Joined:
    Feb 25, 2019
    Posts:
    35
    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.
     
  5. CodeNinja-

    CodeNinja-

    Unity Technologies

    Joined:
    Feb 22, 2023
    Posts:
    26