How do I change the sprite of a button when clicking?

In unity 2d, when i click on a button i want to change the button’s sprite so it becomes pressed and when I release the button it returns to its origional state. How do I do that?

It works! thanks, but how do I change the position of the button with the GUISkin?

Then you have to go and change it with code.

1 Answer

1

Assaign a GUI skin and change the on active properties.