IEnumerator loadJSON() { string URL2 = "http://mrfrankiekklee.pythonanywhere.com/checkVerificationCode/"; codeInput = GameObject.Find("InputField").GetComponent <InputField> (); www = new WWW(URL2 + codeInput.text); yield return(www); loadclassroom = GameObject.Find("LoadClassroom").GetComponent <LoadClassroom> (); print(www.text); print(Application.persistentDataPath); File.WriteAllText(Application.persistentDataPath + "1.json", www.text); // AssetDatabase.ImportAsset ("Assets/Resources/1.json", ImportAssetOptions.Default); loadclassroom.LoadJson(); moveToClassroom(); }