Version: 2018.2
public bool FindNewHost (out Networking.NetworkSystem.PeerInfoMessage newHostInfo, out bool youAreNewHost);

Parameters

newHostInfoInformation about the new host, including the IP address.
youAreNewHostTrue if this client is to be the new host.

Returns

bool True if able to pick a new host.

Description

This is a utility function to pick one of the peers in the game as the new host.

This function implements the default host-choosing strategy of picking the peer with the lowest connectionId on the server.

Applications are not required to use this function to choose the new host. They can use any method they want. The choice does not have to be made synchronously, so it is possible to communicate with an external service to choose the new host.

However, the default UI of the NetworkMigrationManager calls into this function.