public IEnumerator Load(MonoBehaviour caller) { parseCommandLine(); if (isHost) { circlevr.serverIp = "127.0.0.1"; cloudVRClient = new CloudVRClient(circlevr.serverIp, CloudVRClient.config.groupServerPort); yield return(caller.StartCoroutine(cloudVRClient.GetTrackers(caller, (trackers) => { setTrackers(trackers); }, (errorCode, error) => { Debug.Log("CloudVRClient.GetTrackers failed : " + errorCode + " : " + error); } ))); } else { AirVRServer.LoadOnce(); circlevr.serverIp = CloudVRClient.config.groupServerAddress; JsonUtility.FromJsonOverwrite(CloudVRClient.config.userData, circlevr); } }
// handle engine events private void Awake() { _title = transform.Find("Title").GetComponent <Text>(); _description = transform.Find("Description").GetComponent <Text>(); _thumbnail = transform.Find("Thumbnail").GetComponentInChildren <RawImage>(); _screenshots = transform.Find("Screenshots").GetComponentsInChildren <RawImage>(); _cloudVrClient = new CloudVRClient(_hostname, _port); }
// handle engine events private void Awake() { _title = transform.Find("Title").GetComponent <Text>(); _description = transform.Find("Description").GetComponent <Text>(); _thumbnail = transform.Find("Thumbnail").GetComponentInChildren <RawImage>(); _screenshots = transform.Find("Screenshots").GetComponentsInChildren <RawImage>(); _cloudVrClient = new CloudVRClient(_hostname, _port); _commandChannel = new CloudVRCommandChannel(_cloudVrClient, "content"); _commandChannel.CommandReceived += onCloudVRCommandReceived; }
public static UnityWebRequest Post(CloudVRClient client, string path, string body) { UnityWebRequest result = new UnityWebRequest("http://" + client.host + ":" + client.port + path, UnityWebRequest.kHttpVerbPOST); UploadHandlerRaw uh = new UploadHandlerRaw(new System.Text.UTF8Encoding().GetBytes(body)); uh.contentType = "application/json"; result.uploadHandler = uh; result.downloadHandler = new DownloadHandlerBuffer(); return(result); }
private void Awake() { CloudVRClient.Initialize(); }
public CloudVRContent(CloudVRClient owner, string json) { _owner = owner; init(MiniJSON.Json.Deserialize(json) as Dictionary <string, object>); }
public CloudVRContent(CloudVRClient owner, Dictionary <string, object> jsonParsed) { _owner = owner; init(jsonParsed); }
public CloudVRCommandChannel(CloudVRClient client, string type) { _client = client; _type = type; }
public static UnityWebRequest GetTexture(CloudVRClient client, string path) { return(UnityWebRequestTexture.GetTexture("http://" + client.host + ":" + client.port + path)); }