This is my code:
void Update () {
if(Input.GetKeyDown(KeyCode.R))
{
gameObject.GetComponent<Renderer>().material.color = Color.red;
}
}
Then i get this error:
Assets/Color.cs(9,84): error CS0117: Color' does not contain a definition for
red’
Can someone help me im new to Unity and im following the unity C# scripting tutorials