I thought this would automatically be handled by the NetworkLobbyManager (after all, it’s MatchMaker, not a normal hosted game), but it does not 
How do I handle host migration for UNET MatchMaker in the lobby? If someone is in the queue, queues up 14 people, and just before the 15th comes up the host leaves and crashes everyone. This is what I want to avoid ! Thank you~ For some reason, there’s no mention of this for lobby events where it’s equally important.
I tried making a myHostMigration.cs but NONE of the overrides worked like the docs suggest:
bump – a QA just told me that this works for direct connections only, but this was advertised all over to work on UNET. The above pic is even on UNET docs O__o this can’t be right is it? Perhaps I’m in denial after reporting host migration broken as early as June: It’s as if it was planned for UNET, then no one can get it working so suddenly it’s local only?
Hi Dylan,
Host migration should work when using UNET. If you are using a Unity version >= 5.5 it can be enabled by adding a ‘Network Migration Manager’ script to your scene and enabling ‘Host Migration’.
Have you tried doing the above?
I’ve attached a screenshot showing an example of the networking scripts you can add to test the ‘host migration’ functionality.
It does work in LAN games without any problem in 5.4, but not in relay server match games…
In document it says “Additional work is required for this to function with the matchmaker and relay server.”
No further instruction and tutorial can be found so far… Hopefully someone will fill it up soon…
1 Like
I have dug into this a little bit and it seemed to me to come down to a problem with the relay servers themselves. It seems like calling NetworkTransport.ConnectAsNetworkHost() should allow a client to take over as host of the match but it just doesn’t work. The client seems to think everything is fine and they are hosting, but when another client tries to connect to the match it fails. Once the match is started it does not seem to be possible to change the host.
1 Like