Firstly i am using Sprite Manger 2 its a really good script for creating 2d graphics you can see it here . SpriteManager2
I had a problem when using a perspective camera i couldent get the GameObjects to order proply when moving my camera around the GameObjects would move from the front to the back which is very annoying.
So on asking on irc i spoke to Squax which advised me to use another method called “Order by shader”.
What you have to do to cut it short is place a “Tags {“Queue” = “Transparent+1″ } +1 to get the shader to order by the camera. So +1 is at the very back to say +3 front.
You can see in action here
Shader "Alpha Blended On Top"
{
Properties
{
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
}
Category
{
SubShader
{
Tags {"Queue" = "Transparent+1" }
Pass
{
ColorMaterial AmbientAndDiffuse
ZWrite Off
ZTest Always
Cull Off
Blend SrcAlpha OneMinusSrcAlpha
SetTexture [_MainTex]
{
//constantColor [_Color]
Combine texture * primary, texture * primary
//Combine texture * constant DOUBLE, texture * constant
}
}
}
}
}

