public ServerConnection(IChannel channel) { this.channel = channel; IServerManager sm = MgrManager.Instance.GetManager <IServerManager>(); if (sm == null) { Debug.Log("server manager is null"); return; } if (sm.GetServerConnection() == null) { sm.AddServerConnection(this); } }