IEnumerator Start() { Screen.sleepTimeout = SleepTimeout.NeverSleep; if (processRequestsInMainThread) { Application.runInBackground = true; } server = new WebServer(port, workerThreads, processRequestsInMainThread); server.logRequests = logRequests; server.HandleRequest += HandleRequest; if (startOnAwake) { server.Start(); } GameObject.Find("serveraddress").GetComponent <Text>().text = GetLocalIPAddress(); GameObject.Find("status").GetComponent <Text>().text = "Camera Filtering: " + filterSelected; GameObject.Find("status").GetComponent <Text>().color = filterSelected ? Color.green : Color.yellow; if (Application.platform == RuntimePlatform.IPhonePlayer) { capture_ = new DepthCapture(); yield return(Application.RequestUserAuthorization(UserAuthorization.WebCam)); capture_.Configure(filter: filterSelected); capture_.Start(); } }
void Start() { if (processRequestsInMainThread) { Application.runInBackground = true; } server = new UniWebServer.WebServer(port, workerThreads, processRequestsInMainThread); server.logRequests = logRequests; server.HandleRequest += HandleRequest; if (startOnAwake) { server.Start(); } }