- Home /
ios runtime gameobjects not showing up
I have a GameObject in my scene with a script on it that reads data from an xml and creates a variety of cube primitives (and applies other components to them like textures, etc) based on that xml data. I am doing this:
GameObject gobj = GameObject.CreatePrimitive(PrimitiveType.Cube);
gobj.transform.parent = this.transform;
gobj.name = name;
gobj.transform.position = position;
gobj.transform.localScale = scale;
This works fine in the editor, and in unity remote viewer. However when I build to my device, none of these cubes are showing up.
How do I get this to work? Is there some unity restriction I am hitting here?
I searched for answers to this, but haven't found anything yet. Maybe its not allowed to CreatePrimitives at run-time on ios and parent them to existing gameobject transforms???
Thanks
Your answer

Follow this Question
Related Questions
AOT Runtime Problem: Variable of type IMyInterface changes type to String(impossible..??) 0 Answers
ex2D performance 1 Answer
show video frame on texture in ios 1 Answer
What do i need to run my built application for iphone using unity to be run on android devices 1 Answer
What exactly can you can and can't you do when developing for iOS on Windows 1 Answer