- Home /
Question by
rharriso · Sep 22, 2014 at 07:36 PM ·
bugcoroutines
iOS coroutines, Instantiated Objects
I'm having a lot of troubles working with coroutines on iOS with objects instantiated at runtime. Here is the scenario. The scene is being generated from an XML file. The XML file determines what objects are to be created, and what their content will be. public class ParentGO : MonoBehaviour {
void Start(){
foreach(DataModel d in dataModels){
GameObject childObj = Instantiate(childObjectPrefab);
childObject.data = d;
}
}
}
public class ChildGO : MonoBehaviour {
public DataModel{
set{
mDataModel = value;
StartCoroutine(Loadimage());
}
}
IEnumerator LoadImage(){
WWW www = new WWW(mDataModel.imageUrl);
yield return www;
// do stuff with the image
}
}
The code works on every platform but iOS. Is this a bug? I've tried several methods of instantiation, and events. Whenever the yield statement is reached, the application halts without producing an exception or error.
Comment
Your answer

Follow this Question
Related Questions
Unity Coroutine problem 1 Answer
Are coroutines freezing my game? 0 Answers
Coroutines white death causes? 0 Answers
Unity is not starting 1 Answer
Animator bug when activating a transition condition using SetBool 0 Answers