public override void OnClientConnect(NetworkConnection conn) { base.OnClientConnect(conn); Debug.Log("Connected to server!"); if (ConnectionEstablished != null) { ConnectionEstablished(); } triggeredConnectionLost = false; AddHybridPlayerMessage msg = new AddHybridPlayerMessage(); msg.playerControllerId = 0; msg.playerType = Utils.CurrentPlayerType; conn.Send(CustomMsgType.AddHybridPlayer, msg); }
public override void OnClientConnect(NetworkConnection conn) { base.OnClientConnect(conn); Debug.Log("Connected to server!"); if (ConnectionEstablished != null) { ConnectionEstablished(); } AddHybridPlayerMessage msg = new AddHybridPlayerMessage(); msg.playerControllerId = 0; msg.PlayerType = Utils.CurrentPlayerType; if (msg.PlayerType == Utils.PlayerType.HoloLens) { msg.AlignmentPosition = markerTransform.position; msg.AlignmentRotation = alignmentYRotation; } conn.Send(CustomMsgType.AddHybridPlayer, msg); }