Search Unity

how to make custom host migration manager?

Discussion in 'Multiplayer' started by jsc18, Aug 23, 2016.

  1. jsc18

    jsc18

    Joined:
    Aug 14, 2016
    Posts:
    5
    default host migration do not select automatically one of a number of the client to the host by using network migration manager component.

    It should choose "Pick New Host" or "Leave Game" from the UI menu when host is disconnected.

    how to select host automatically Of a lot of clients when host is disconnected?
     
  2. webik150

    webik150

    Joined:
    Mar 23, 2013
    Posts:
    62
    I too would like to know this
     
  3. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    One approach that comes to my mind is for every client to have all the SyncVars in some sort of manager script. Every client would also have a list of all players. The higher up in the list the better suited for a host they would be or something like that. Then on disconnect. If you are top of the list. You host and set the states. Then the others try to connect. And if you fail connection within x seconds. Everyone would try the second in the list. Or something along those lines. But for best results a thrid "master" server of some sort would probably be nice.