public override void OnServerDisconnect(NetworkConnection conn) { connections.Remove(conn); ServerDisconnect.Invoke(conn); base.OnServerDisconnect(conn); }
public override void OnServerDisconnect(NetworkConnection conn) { CallbackLog($"OnServerDisconnect({conn})"); ServerDisconnectEvent?.Invoke(this, EventArgs.Empty); base.OnServerDisconnect(conn); }
/// <summary> /// Called on the server when a client disconnects. /// By default removes player controller with avatar from game (using NetworkServer.DestroyPlayersForConnection). /// </summary> /// <param name="conn"></param> public override void OnServerDisconnect(NetworkConnection conn) { Debug.LogFormat("OnServerDisconnect: {0}", conn); if (DefaultOnServerDisconnectLogic) { ServerDisconnect.Invoke(conn); } base.OnServerDisconnect(conn); }
private void Channel_Faulted(object sender, EventArgs e) { //Server disconnected - should reconnect ServerDisconnectEvent?.Invoke(this, "ServerDisconnect"); }
private void Channel_Faulted(object sender, EventArgs e) { ServerDisconnectEvent?.Invoke(this, "ServerDisconnect"); }