- 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
![](https://koobas.hobune.stream/wayback/20220613150925im_/https://answers.unity.com/themes/thub/images/avi.jpg)
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