Controlling an object's transparancy on trigger

In my game, I want my room prefab to turn at least somewhat transparent or even invisible after a condition concerning an object within it is met, after which it instantiates another room.


I have all my instantiation code working, it’s just the transparency that I don’t understand. I want to make the previous room transparent so it doesn’t get in the way. I don’t know exactly how to control this and I keep reading it depends on the material being used. Right now, I’m using a Toon/Lighted material for most of my models. I’m not sure if that material has an alpha channel within it or not. Exactly how would I control the transparency of my overall prefab or individual models within it, preferably the former since doing it one by one may be somewhat time consuming.

Create such a material:

Handle Transparency:

Handle Transparency using scripts:

gameObject.renderer.material.color.a = 0.5;

For more info: Unity - Manual: Transparent Diffuse