Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

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:
    7,263
    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:
    39
    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:
    27