This is beyond confusing. Is there a simple way to assign an existing material to an object on an event from your Materials folder, then switch it back out after that event has taken place? Like CSS for link and hover.
something like this, (pretending we have two materials in the Materials folder, one already assigned to the object (normal01) and another called “ouch01”, who isn’t assigned to anything in particular but we want him to come and switch out “normal01” for a little bit to indicate something happened):
if ( some kind of event )
{
renderer.sharedMaterial = ouch01;
yield new WaitForSeconds (0.5);
renderer.sharedMaterial = normal01;
}
How would one make the above magic work?