- Home /
How would I make text change size on mouse hover/end,How do I make text change size on mouse hover?
Hello there,
I have recently been trying to make the main menu for my game and I want to have buttons where on hover they change their size, and on hover end, they go back to normal but I have no idea how to do this, does anyone know how?
I also want to have the same effect with text; make it bigger on mouse hover and revert to original size when the mouse leaves it.
Answer by Unrighteouss · Aug 31, 2021 at 03:50 PM
So the easiest way to do this is with the "Event Trigger" component. Add the component to a button, then press "Add New Event Type," "PointerEnter" and "PointerExit." Then create public methods that increase/decrease the button size, and link those to "PointerEnter" and "PointerExit."
For the text, you can just use buttons too. Buttons don't actually need to be used for clicking.
Here is a video demonstrating how to link public methods to buttons: https://www.youtube.com/watch?v=kdkrjCF0KCo
The Event Trigger component works the same way.
Your answer
Follow this Question
Related Questions
Activate/Deactivate Scripts form another Script 2 Answers
Respawn script not working. 2 Answers