Help Please - GetComponent Issue In Course

Hi there! Looking for some help if possible, I’m currently working my way through the [Complete C# Unity Game Developer 3D (Updated To Unity 6) on Udemy and having an issue on section 14 when trying to do the GetComponent(Material.color = Color.blue; section and getting the CS1061 error in the console, I can’t quite work out what I’m doing different to Rick in the course.

Any help would be amazing, thank you in advance :slight_smile:


Hi ProjectFoxx, welcome to the community. Try spelling material with a lower case m.

GetComponent<MeshRenderer>.material.color = Color.blue;

It is very important to pay attention to case. Capitalization is easy to miss when looking for errors.

2 Likes

Hi there! Thank you for the warm welcome!

GOD! How did I miss that! Thank you so much, that’s solved it I was going in circles as it wasn’t giving me the automatic code fill options of material etc.

THANK YOU!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms