I have a button that is a plane with a texture on. I need a way for the user to tell if it has been clicked. Is there something about the material I can change to make it look darker or lighter?
From a quick look at the Unlit transparent shader, there looks like there is no color property to manipulate. The best way to do this would be to have a second Texture with a lowered alpha to toggle between.
If you don’t want to change the color or make another texture, you could always do a small animation to indicate that it has been pressed.
Some Options:
-
You could create a new shader based
on the Unlit Transparent one, and
give it a colour property that you
can then change at runtime. Then
you’d be able to use your existing
code. -
Change the texture when the mouse
is hovering over it. -
Draw the item in 2D using GUI (this assumes your button isn’t SUPPOSED to be a 3D object) and use GUI.color to influence both colour and transparency.