- Home /
Change Button sprite state to pressed when submit is called on the button
Hi there,
Using the new input system, I've set up a basic main menu scene where the buttons' transitions are a Sprite Swap and will change sprite depending on whether you've selected and pressed it, this all works fine with the mouse, however when I use the submit controls to try and press the button the sprite doesn't change to the pressedSprite state (Although it does run the OnClick() function).
Also, when I select buttons with the arrow keys / WASD the sprite DOES change to the selectedSprite state.
Any help would be much appreciated.
Your answer
![](https://koobas.hobune.stream/wayback/20220613003014im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How do I detect when UI events are triggered on *any object*? 1 Answer
Change sprite of UI image and then set time.timescale = 0; 1 Answer
Personaje cambie de sprite al teleportarse [Characters change sprite to teleport] 0 Answers
each character doubled in inputfield in build but not editor on ubuntu 16.04 2 Answers
Touch Input on Sprites 1 Answer