[SOLVED]Fade in/fade out objects?

Good afternoon everyone,

I’m trying to figure out how to get objects to fade in and fade out, but unfortuately I can’t seem to get it to work. Are there any tutorials or postings around that give examples of going from 0-100% transparency and back again? So far my searches have come up without any answers.

Any links and advice greatly appreciated!

~D

Set your object’s shader to Transparent Diffuse, and then do this whenever you want to change the transparency:

var tempColor : Color = renderer.material.color;
tempColor.a = newTrans;
renderer.material.color = tempColor;

newTrans would be the variable that determines how transparent. It goes on a scale of 0 to 1, with 0 being fully transparent and 1 being almost 100% opaque.

Ah! I didn’t have the right shader on the object! Thanks for the solution!