I’m trying to use a variable to change the material of an object.
it doesn’t seem to be working can anyone offer any advice.
below is a simplified version of my script, i’m new to scripting and probably missing something simple.
var finalColor : String = (" ");
function Start ()
{
var finalColor = (“red”); //i have a different formula i use to set this color, i’ve simplified it here.
this.renderer.material.color = Color.finalColor; // normally this would be = Color.red, but i’m trying to set it as a variable.
}