In this recipe, you created a button and set its Transition mode to Animation. This makes Unity require an Animation Controller with four states: Normal, Highlighted, Pressed, and Disabled. You then made Unity automatically create an Animation Controller with these four states.
Then, you edited the animation for the Highlighted (mouseover) state, deleting the second keyframe, and making the only keyframe a version of the button that's larger so that its scale is 1.2.
When the mouse is not hovering over the button, it's unchanged, and the Normal state settings are used. When the mouse moves over the button, Animation Controller smoothly in-betweens the settings of the button to become those of its Highlighted state (that is, bigger). When the mouse is moved away from the button, Animation Controller smoothly in-betweens the settings of the button to become those of its Normal state (that is, its original size).
The following web pages offer video and web-based tutorials on UI animations:
- The Unity documentation about UI Button Animations: https://docs.unity3d.com/Packages/[email protected]/manual/UIAnimationIntegration.html.
- Ray Wenderlich's great tutorial (part 2), including the available button animations, is available at http://www.raywenderlich.com/79031/unity-new-gui-tutorial-part-2.