Ejemplo n.º 1
0
    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);
    }
Ejemplo n.º 2
0
 public CircleVRError(CircleVRErrorType type)
 {
     this.type = type;
 }
Ejemplo n.º 3
0
    public static void SendError(int connectionId, CircleVRErrorType cvError)
    {
        string msg = JsonUtility.ToJson(new CircleVRError(cvError));

        Send(CircleVRPacketType.Error, StringToByte(msg), connectionId, reliableChannel);
    }