x


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

more ▼

asked Jul 14 '11 at 09:29 PM

pogoli gravatar image

pogoli
1 1 1 1

(comments are locked)
10|3000 characters needed characters left

0 answers: sort newest
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1999
x1953
x374
x9
x4

asked: Jul 14 '11 at 09:29 PM

Seen: 526 times

Last Updated: Jul 14 '11 at 09:29 PM