Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: superp on September 20, 2014, 02:34:21 AM

Title: object Z-orders on screen
Post by: superp on September 20, 2014, 02:34:21 AM
I am writing 2d game.
In my scene, at the bottom, i have NGUI panel depth 1 and have a few buttons.
On top of that i have Unity's game object with animator that plays animation. it is in NGUI's panel with depth 2.
On top of that, i have NGUI's panel depth 3 that sometimes serve as pop up. It shows a sprite with message.

The problem i am having is that the panel's depth doesn't seem to apply to the animator object. it is always shown on the top of other panels.

Is there a way to make Unity game object to follow the panel depth order?
thanks
Title: Re: object Z-orders on screen
Post by: ArenMook on September 20, 2014, 09:29:20 AM
Which camera is it seen with? For depth to function they must all be drawn using the same camera.
Title: Re: object Z-orders on screen
Post by: superp on September 20, 2014, 06:36:11 PM
there is only one camera and all objects are at the same layer
Title: Re: object Z-orders on screen
Post by: ArenMook on September 21, 2014, 09:05:47 AM
Make sure the event type is of UI type, like 3D UI. if it's 3D World then it's not going to be based on Depth.