Looking at the shader here:
http://wiki.unity3d.com/index.php/Transparent_Cutout_Soft_Edge_Unlit_Texture_Blend
Does anyone know a way to animate the blend slider in game? So the slider can move from 1 extreme to the other over 1 second or so. How would I do that? Thanks
Thanks for your help, I never thought to check the animation component.
This appears to be what I was after
#pragma strict
var speed: float = 1.0;
var test: float = 0.0;
function Start () {
renderer.sharedMaterial.shader = Shader.Find("BlendShader");
renderer.sharedMaterial.SetFloat("_Blend",0);
}
function Update () {
test= renderer.sharedMaterial.GetFloat ("_Blend");
test= Mathf.MoveTowards(test,1,speed*Time.deltaTime);
renderer.sharedMaterial.SetFloat("_Blend",test);
//print(test);
}