I created a new shader that uses vertex color alpha, a tint color, and a single alpha texture. I can assign this shader to my object, and it behaves just like I want it to. Then, I save my scene, exit Unity, relaunch Unity. Now any object assigned to this shader appears completely transparent.
I know it hasn’t moved, because I can select it and see its wireframe. If I assign a different shader to the material, I can see the object again. I then assigning my custom shader again and it looks fine. But, if I exit Unity and restart, everything is gone again.
Here is the code for my shader. I’m wondering if turning lighting off has something to do with it?
------ See shader below --------
Shader "My Shaders/Alpha Vertex Alpha"
{
Properties
{
_Color ("Color Tint", Color) = (1,1,1,1)
_MainTex ("SelfIllum Color (RGB) Alpha (A)", 2D) = "white"
}
Category
{
Lighting Off
ZWrite Off
Cull Back
Blend SrcAlpha OneMinusSrcAlpha
Tags
{
Queue=Transparent
}
BindChannels
{
Bind "Color", Color // bind vertex color to 'primary' color
}
SubShader
{
Pass
{
SetTexture [_MainTex]
{
constantColor[_Color]
Combine Texture * constant, Texture * Primary
}
}
}
}
FallBack "Transparent/Diffuse"
}