public void OnDestroy() { // If this is a client player on the server then OnClientExitLobby will not be called. // Call it here instead. if (networkManager.IsHost() && networkManager.localPlayer != this) { OnClientExitLobby(); } }
public bool IsHost() { return(networkManager.IsHost()); }