- Home /
WWW request works in Editor but not in IOS?
I have a .txt on a website and a scrip that pulls the text from that .txt into unity like so.
IEnumerator Start() {
WWW www = new WWW(url);
yield return www;
if(www.error == null){
wow = www.text;
Debug.Log(wow);
}
PlayerPrefs.DeleteAll();
if(PlayerPrefs.HasKey("PartnerSex")){
int maleBool = PlayerPrefs.GetInt("PartnerSex");
if (maleBool == 1){
partnerIsMale = true;
}
else{
partnerIsMale = false;
}
Initilize();
}
else {
ActivateMenu (13);
}
}
It works just as intended in the editor, It pulls the text down and I can play with it. When I build to IOS however. It does not pull the text down.
Any ideas?
Answer by Anxo · Jan 22, 2013 at 09:04 PM
This problem ended up being entirely my fault.
I had a variable for the url at the top that was public. so when I changed it later from a "angryarray.com" to "http://angryarray.com" the change did not hold as it was overwriting in the inspector of the editor.
Your answer
Follow this Question
Related Questions
Does overriding UnityWWWRequestDefaultProvider works for UnityWebRequest? 0 Answers
WWW Class behaves strangely on iOS 3 Answers
WWW post request failing on 64 bit iOS 0 Answers
Is there a way to estimate file size from www class downloaded from Dropbox 1 Answer
Web radio playing inside unity? 2 Answers