/// <summary> /// Tests the connection. /// </summary> /// <returns>The connection.</returns> /// <param name="action">Action.</param> IEnumerator TestConnection() { WWWForm form = new WWWForm(); using (UnityWebRequest www = UnityWebRequest.Post(path + "connectioncheck.php", form)) { yield return(www.SendWebRequest()); if (www.isNetworkError || www.isHttpError) { Debug.Log(www.error); Debug.Log("No connection. No progress will be saved."); if (GameSaveUtility.OfflineMode != 2) { GameSaveUtility.SetConnectionMode(1); } } else { Debug.Log("Connection established."); GameSaveUtility.SetConnectionMode(0); } } }