Unity 2DToolKit sprite sort problem

I use Unity with 2DToolKit to develop a 2d game. Now I have two sprites(A and B) in the scene and they have the same Z value. How can I put A on the front of B or put B on the front of A ?

For beginners:

Simply move the game object forwards or backwards … that is to say nearer or closer the camera. Click on the game object (the sprite) in your editor. notice the red, green, blue arrows. Grab one of the arrows to move the object. For beginner articles, try unityGEMS.com, it’s great !


For badass 2.5D developers:

This is a core concept in 2.5D games: you have all the colliders on one layer … say z=10, for example. You actually have the sprites separate, on their different layers … perhaps 15 and 16 in the example.


However, there is a simple, clever trick to get you by in many situations:

Step one, your two sprites put them on slightly different layers … say 5 and 6 for example.

BUT in fact make the colliders REALLY DEEP … say 5 deep.

then it will still work perfectly.

To make it clearer for you when working in the editor, simply change the position by a small amount (perhaps 0.05) but make sure the colliders are, say, 2 deep.

Recall that – of course – you will have the various rigidbody locked-off so they can only rotate on Z, or depending on your game, likely not rotate at all, and not move back and fore on Z.

Pls vote up that answer …

if it is useful to you, as it is a critical trick in 2.5D games!