How to accomplish a "cloaking"/semi invisibility e

I haven’t worked much with manipulating textures or materials in Unity yet, so I have no idea how to accomplish this.

I want to have a character become semi-transparent at times to simulate a “cloaking” or invisibility effect. I thought I could just manipulate the object’s “alpha” value (like in Flash) but I’ve been through the documentation and cannot find anything. The closest thing I can find right now is the Renderer object but looking through it’s methods I can only see ways to manipulate the color of the material.

Any ideas how to accomplish this?

I forgot to mention that I am using Unity iPhone Basic version. I suppose some shaders are not available for that version.

You were nearly there :wink:

The Renderer has a property called “material”. The Material class has a color property. Changing the alpha is (usually) just a matter of setting this colour with the right alpha value:-

renderer.material.color = <same colour with lower alpha>;

Thanks. That worked, but a note to anyone else attempting this. I found out that I also needed a Transparent shader. In this case I used the Transparent/Diffuse shader.
Here’s the code I used to make the object semi-transparent. Hope this helps out people who want to accomplish something similar.

function Start(){
var mycolor=Color.white;
mycolor.a =.4;
renderer.material.color =mycolor;
}