Quantcast
Channel: Questions in topic: "webrequest"
Viewing all articles
Browse latest Browse all 387

Converting from WWW to UnityWebRequest

$
0
0
I've been trying to make a register function for a database and have run into an issue with using WWW where I'm told its obsolete and to use UnityWebRequest, however when I switch WWW with UnityWebRequest other issues arise, does anyone know what I could do to fix this? Here is the code: IEnumerator Register() { WWWForm form = new WWWForm(); form.AddField("name", regUsernameField.text); form.AddField("password", regPasswordField.text); WWW www = new WWW("http://localhost/sqlconnect/register.php", form); yield return www; if (www.text == "0") { Debug.Log("User created successfully"); UnityEngine.SceneManagement.SceneManager.LoadScene("StartMenu"); } else { Debug.Log("User creation failed. Error #" + www.text); } }

Viewing all articles
Browse latest Browse all 387

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>