- Home /
Question by
Lohide · Mar 20, 2015 at 01:10 PM ·
scripting problemscriptingbasics
If renderer.material.color help!??!?!!?
Here is my code, I am trying to make a script that after a certain amount of time, if the objects material is red it will end the scene.
unity-answers.png
(9.5 kB)
Comment
Answer by Pemu · Mar 20, 2015 at 01:17 PM
You should use "==" and "{", check this:
if(renderer.material.color == Color.white){
renderer.material.color = Color.blue;
}
This should work ;)
Your answer
Follow this Question
Related Questions
How to make door open and close with Input.GetButtonDown? 1 Answer
How to check if variable defined in script is present in shader? 1 Answer
Importing a class into multiple scripts 0 Answers
how can I change a light with multiple triggers. ? 0 Answers
Beginner Question: How to get normals from a physics raycast using visual scripting? 0 Answers