- Home /
Detect gameobjects color change
hi, in a 2D game, i made some gameobjects change their color, i want to know if there is a way to detect all the gameobjects who changed their color. Here is the code i did to change color : (gameObject.Find("ball").renderer.material.color = Color.green).
Thanks
Answer by Graham-Dunnett · Jun 06, 2014 at 12:18 PM
Have a list of changed colour game objects. When you change the colour of a game object, add it to this list. Once you have done whatever you want with this information, remove the game object from the list.
Thanks for your answer. i'm beginner, what do you mean by a list is it an array ?
Your answer
Follow this Question
Related Questions
Change colour of int when reaches specific number 1 Answer
HealthBar with ColorChange 1 Answer
Changing a second objects material on trigger 0 Answers
Changing two different objects renderer colour 1 Answer
light being colored 1 Answer