public bool AddConnectedUserIDs(string userID, out CircleVRErrorType error) { if (connectedUserIDs.Contains(userID)) { Debug.Log("[CircleVR Host] Already Host Has User ID : " + userID.ToString()); error = CircleVRErrorType.AlreadyHasUserID; return(false); } if (CircleVR.GetPair(userID) == null) { Debug.LogError("[CircleVR Host] Not Found User ID In Pairs : " + userID); error = CircleVRErrorType.NotFoundUserIDInPairs; return(false); } connectedUserIDs.Add(userID); CircleVRDisplay.Camera.SetDisplay(connectedUserIDs); foreach (var Event in events) { Event.OnAddConnectedUserID(userID); } Debug.Log("[CircleVR Host] Add UserID Succeed! : " + userID.ToString()); error = 0; return(true); }
public CircleVRError(CircleVRErrorType type) { this.type = type; }
public static void SendError(int connectionId, CircleVRErrorType cvError) { string msg = JsonUtility.ToJson(new CircleVRError(cvError)); Send(CircleVRPacketType.Error, StringToByte(msg), connectionId, reliableChannel); }