Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

creating player hosted games

Discussion in 'Multiplayer' started by kurtiswoww, Apr 30, 2019.

  1. kurtiswoww

    kurtiswoww

    Joined:
    Oct 2, 2013
    Posts:
    16
    hi everyone!

    We need advice if the following is possible with out of box unity + unet or do we need external stuff like photon/playfab?

    1) we want a way for players to host games for other players to join
    2) if the host player leaves/disconnects, then another existing player can take over hosting of the game

    thanks!
     
  2. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,732
    Photon PUN handles this scenario automatically and flawlessly.

    The only thing you need to do when the host changes is make sure that the new host has synchronised with the old host any room state that it needs to control. I often do this using room custom properties
     
    Last edited: Apr 30, 2019
  3. kurtiswoww

    kurtiswoww

    Joined:
    Oct 2, 2013
    Posts:
    16
    Hey Thanks for replying.

    so is using external stuff like photon the only way? or will i be able to use unity + unet? i see that unity has a host migration object but wondering if its just too much hassle to set it up

     
  4. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,732
    As far as I know PUN is the only option for automatic host migration, although someone else may know better.

    As far as UNET goes, not only is it deprecated, but the host migration only works for LAN connections and it isn't automatic.
     
  5. kurtiswoww

    kurtiswoww

    Joined:
    Oct 2, 2013
    Posts:
    16
    oh,... fiddlesticks... ok thanks!

     
  6. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Please, people need to stop asking if Unet is right for their brand new project. Doesn't matter your project, doesn't matter if the features match well with what you want to build, the answer is "No."

    There is a big sticky thread stating that it was deprecated from almost a year ago, and nearly every page in the Unity manual on Unet states it is deprecated with removal pending. That should be both the beginning and end of the entire decision making process.

    I don't understand why there is a new thread on this every couple of days. Must be the same people who are signing up for Google+ still.
     
    Munchy2007 and Srokaaa like this.