Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ziggyeye

Pages: [1]
1
Support / Re: Can't change draw order of sprites
« on: June 18, 2013, 06:40:44 pm »
That worked! Was driving me crazy.
Thank you for the help!

2
Support / Can't change draw order of sprites
« on: June 18, 2013, 03:26:23 am »
I'm changing the draw order of some sprites in code and through the editor but nothing seems to happen.

In code, I add sprites onto a GameObject I have on the scene.

sprite = (GameObject)Instantiate(spritePrefab);
sprite.transform.parent = this.transform;
sprite.transform.position = new Vector3(160, 240, -1.0f);
sprite.transform.localScale = new Vector3(1,1,0);

sprite2 = (GameObject)Instantiate(spritePrefab2);
sprite2.transform.parent = this.transform;
sprite2.transform.position = new Vector3(160, 240, -2.0f);
sprite2.transform.localScale = new Vector3(1,1,0);

However, when I run it, I notice the sprites have a z of 0 and changing the z in both editor and code does nothing. Changing x,y works fine so I know the sprites are hooked in correctly.

Any help would be appreciated.

Thanks.


Pages: [1]