unity refers to all the images in the scene instead of just one

The material is shared for optimisation, it’s the same one used for all the images using it.

You need to change the color of the image, simply remove material on your lines.

gameObject.GetComponent<Image>().color=new Color(1,1,0);

The Button component has transition settings where you can set colors for state, maybe you dont need the extra code.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top