public IEnumerator CheckConnection() { status = ""; WWWForm form = new WWWForm(); form.AddField("function", "CheckConnection"); form.AddField("photoFilePath", "testConnection " + System.DateTime.Now); if (isInDebugMode) { Debug.Log("PHP url: " + PHP_url); } using (var w = new WWW(PHP_url, form)) { yield return(w); //Debug.Log(w.error); if (w.error != null) { status = "Fail"; pa.ShowBugPage("Failed to connect to server"); if (isInDebugMode) { Debug.Log(DateTime.Now.ToString("HH:mm:ss ") + " status: " + status + " error: " + w.error); } //Debug.Log("not ok"); } else { status = "Good"; if (isInDebugMode) { Debug.Log(DateTime.Now.ToString("HH:mm:ss ") + w.text + " status: " + status); } } } }
IEnumerator CheckDevice() { yield return(new WaitForEndOfFrame()); if (devices.Length == 0) { if (isInDebugMode) { Debug.Log("No devices cameras found"); } pa.ShowBugPage("No camera found"); yield return(null); } for (int i = 0; i < devices.Length; i++) { if (isInDebugMode) { Debug.Log("Device Name: " + devices[i].name); } } }