UIButtonHoverExpand

Contents

UIButtonHoverExpand#

NAMESPACE:

UnityUtils.ScriptUtils.UI

The UIButtonHoverExpand script is used to quickly add scale animation to buttons.

Usage#

Add a ‘UIButtonHoverExpand’ Script to a UI button and when you hover over the button the button will expand and shrink! See below for the customizable values on the script.

Functions#

UnityUtils.ScriptUtils.UI.UIButtonHoverExpand : MonoBehaviour , IPointerEnterHandler , IPointerExitHandler

Public Members

float hoverSize = 1.1f#

When hovered this is the size the button will be set to.

float sizeAnimationSeconds = 0.1f#

The amount of seconds that the button will size up or down in.

bool useRealtime = true#

true to use unscaled real time for the animation (ignoring time scale)

AnimationCurve SizingCurve = AnimationCurve.EaseInOut(0, 0, 1, 1)#

The AnimationCurve that the button will follow.

Transform applyTransform#

The object to apply the transform to (Default’s to the applied object).

bool hoveringOverButton#

True if the button is being hovered.

bool logScale#

Log on any scaling.

bool logScaleUp#

Log first scale to set scale.

bool logScaleDown#

Log second rotate back to default pos.