public void OnConnectEvent(int hostId, int connectionId, int channelId) { _connectionId = connectionId; _serverPeer = Activator.CreateInstance <Protocol>(); _tempConnectionHandler.Invoke(); _tempConnectionHandler = null; Debug.Log(string.Format("Connect to server. Id : {0}", connectionId)); _serverPeer.OnCreated(hostId, connectionId); }