Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

error CS0103: The name 'Red' does not exist in current context

$
0
0
Hi am doing a tutorial https://unity3d.com/learn/tutorials/modules/beginner/scripting/scripts-as-behaviour-components?playlist=17117 void Update () { if (Input.GetKeyDown(KeyCode.R)) { gameObject.GetComponent().materials = red; } if (Input.GetKeyDown (KeyCode.G)) { gameObject.GetComponent().materials = green; } if (Input.GetKeyDown (KeyCode.B)) { gameObject.GetComponent().materials = blue; } } } and in the console I get error CS0103: The name 'Red' does not exist in current context can anyone help with the current scripting

Viewing all articles
Browse latest Browse all 2891

Trending Articles