Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Donkey111 on September 22, 2013, 12:08:52 PM
-
Sprite A and Sprite B both use the same atlas and are int the same anchor. Sprite A has a depth of -8. Sprite B has a depth of 2. Yet Sprite A sorts in front of Sprite B!
Sprite B is a dynamically created pre-fab. Could that be a reason it is not sorting in front of the background sprite? Any suggestions?
-
Upgrade to 3.0. 2.7 and earlier still have panels split draw calls and batch everything together. 3.0 is more careful in the matter and creates extra draw calls as needed.
-
My game is pretty far along. I'm concerned upgrading will require a lot of re-work.
But if that is the only solution, I will upgrade.
-
NGUI 3.0 sorting question
prefab A - depth 100
Instantiate prefab A
ex) layer
A - depth 100
<--- how can i put some object between A?
A - depth 100
-
Donkey: You might have a Panel on the generated prefab - people tend to accidentally add it by editing the prefabs in the root of the hierarchy. Kill that off and it should sort properly.
Otherwise, make a backup and try to upgrade to 3.0 - if it fails, roll back and check the prefab properly.
anord: You should change the depth values run time so it's sorted the way you want.