3
« on: May 08, 2014, 08:36:26 PM »
I've recently finally migrated over to 3.5.8 from 2.7 (been using NGUI for a while now but had a lot of code hooked into it) so I have almost all the issues tackled except one. I have a speech bubble for each character with some text, and I add their speech bubbles to a panel root object and had the objects sorted by z position on the transform. So my set up is like this:
UIPanel (Panel Root Object)
--UISprite (Speech Bubble)
--UILabel (Speech Bubble Text)
I had read that this no longer works in 3.0 + and you have to use Explicit Render Queue 3000 in the UIPanel to get it to use z positioning. I do this because the characters move in 3D space and I want the speech bubbles to move with the character, so I update their transforms along with the characters position. However when I do this the most recently added speech bubble always appears in front even though the z position is further away. It moves and zooms properly but it seems like the sorting doesn't get refreshed when new speech bubble objects are added. The new objects always appear in front and ignores the z transform positioning. Is there any way around this? I seem to be stumped on this one.