I’ve seen some similar questions but they’re all a bit specific.
What I want to achieve is to have a model that will slowly fade in then fade out again (over about 5 seconds)
I’ve got the following script that can set the transparency:
#pragma strict
private var Cube : GameObject;
Cube = GameObject.Find("Cube");
function Start () {
}
function Update () {
Cube.renderer.material.color.a = 0.5;
}
How would I go about setting the transparency to go from 0 to 1 then back to 0 over a period of time?