Hi,
I am using Spine in conjunction with NGUI to build my game and I require the ability to have multiple instances of SkeletonAnimation that use the same SkeletonData while being able to adjust their depths individually.
The reason I need this is so I can have the following scenario:
- Object 1 (Skeleton Animation with an NGUI Label on top)
- Object 2 (Skeleton Animation with an NGUI Label on top)
- Have Object 2 overlap Object 1 and be in front of both the SkeletonAnimation and the NGUI Label
I can change the depths of the SkeletonAnimation using (for example):
renderer.material.renderQueue = 4000;
I can also explicitly set the NGUI Label's renderQueue (so I would set it to 4001 in this example).
This works fine and I get the label on top of the SkeletonData, however If I set Object 1 to 4000 & 4001, and Object 2 to 4002 & 4003 I get the Labels on top of everything and the SkeletonAnimations overlapping randomly (same as when two objects have the same draw call and Unity randomly decides which is on top.
So even though I set Object 2's SkeletonAnimation to 4002 (above both of Object 1's parts) Object 1's Label still shows up in front and it's random which pig is in front of the other.
I've tried just about everything I can think of and have not gotten anywhere yet. Anyone have any input ?