Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: triggly_glix on October 22, 2013, 06:44:06 AM
-
So... I'm running NGUI 2.7 and my basic problem is that if I have two atlases - and i have sprites from Atlas A at the back and then in the middle Atlas B and then in the front more sprites from Atlas A... then all the sprites from Atlas A will be batched into one draw call and will all either be behind or in front of Atlas B...
Is there no way around this at all?
What I would like is that the sprites from Atlas A were split into two draw calls so that the draw order of the scene could be maintained.
thanks...
-
This is an old question, and there used to be a sticky about it.
You can use a secondary UIPanel to split off a new draw call.
Widgets in the same material, in the same panel are batched together.
-
thanks -
i've just spent an hour trying to get something very simple along these lines to work -
i'm now moving the gameobjects to another panel when i want them to appear behind the object... and it's still not working
i see it clearly in the editor - i move a sprite on the Z in one panel and sprites that are from the same atlas but in another panel flicker behind and in front of objects...
could this be because i've moved the sprite to a new panel programatically - is there some refresh call i need to let NGUI know i've moved it to another panel and that it should be batched separately?
thanks!
just to be clear I've got 2 panels within the same UI widget ... and i'm trying to have some sprites from the same atlas draw in front of and behind an object
-
NGUI 2.7 is still not 100% depth-based. Only NGUI 3 is. Multiple panels in 2.7 still require adjusting of Z, if I recall correctly.