- Home /
Show Image when button is highlighted
I am making my first game and I have the UI setup. I want an image to show up next to the button when my mouse hovers over it just like how the box becomes highlighted. I have tried a few things but they don't seem to work and I can't find any solutions online.
Thank you to anyone who can help!
Answer by imaginationrabbit · Apr 27, 2019 at 01:30 AM
You can use OnSelect to do this OnSelect
Just have a script on your button that implements OnSelect and whatever code you put in there will run when the button is selected;
Okay, Thanks. Will this work without me actually selecting(clicking) the button. Basically I have a race track menu and i want a preview of each track when you hover over the button.
Your answer
Follow this Question
Related Questions
Graphics Raycaster - Click on overlapped buttons 1 Answer
Changing anchor positions on UI? 0 Answers
UI Buttons - affects all 0 Answers
how can i clone ui button ? 2 Answers