// Use this for initialization void Start() { if (!HttpListener.IsSupported) { Debug.Log("HttpListener not supported"); return; } taskExecutor = GameObject.Find("TaskExecutor"); taskExecutorScript = taskExecutor.GetComponent <TaskExecutorScript>(); try { httpListener = new HttpListener(); httpListener.Prefixes.Add("http://*:" + port.ToString() + "/"); httpListener.Start(); listenerThread = new Thread(StartListener); listenerThread.Start(); Debug.Log("Server started"); } catch (Exception e) { } }
void GetSceneObjectReferences() { taskExecutor = GameObject.Find("TaskExecutor"); taskExecutorScript = taskExecutor.GetComponent <TaskExecutorScript>(); }