Question by
BacN · Sep 02, 2015 at 07:32 PM ·
fpsgetcomponentcomponent
How to use "GetComponent().material.color = Color.yellow;"
The code doesn't seem to be working and I really need to know how :/
Comment
Answer by Positive7 · Sep 02, 2015 at 07:40 PM
GetComponent<Renderer>().material.color = Color.yellow;
Your answer
Follow this Question
Related Questions
How do declare a nonspecific class to be defined later. 1 Answer
How do you use a Component slot? 1 Answer
How to correctly handle NullReferenceException when using GetComponent<>? 1 Answer
Avoid using GetComponent to check if RayCast hit is interactable 0 Answers
Game Manager can't decide what the instance of the object is despite just making an instance of it 1 Answer