Skip to content
InvexGames edited this page Jan 12, 2015 · 10 revisions

Description and Uses

The Button, like its uGUI counterpart, acts as a clickable control, usually containing text or an image. The 'ButtonLayer' (default name) object contains the RippleConfig and ShadowConfig components, automatically giving the Button dynamic ripple and shadow effects.

A button in action


Auto-resizing the Button based on the Text contents:

It's fairly annoying to have to manually calculate and change the button's dimensions every time, so a 'Snap Button To Text' component is attached (by default) to the top-most object of the Button control. Simply press the 'Snap' button to snap the Button to its Text content. Custom padding around the button can be defined, but is set to the Material Design values by default.


Resizing the Button:

If you want to manually resize the button, simply edit the RectTransform's width and height values of the top-most object of the Button control. You can also use the drag handles in the Scene View. Then, the Button's contents (usually Text or icon) can be resized separately.

Clone this wiki locally