UIButtonHoverPosition#
- NAMESPACE:
UnityUtils.ScriptUtils.UI
The UIButtonHoverPosition script is used to quickly add movement animation to buttons.
Usage#
Add a ‘UIButtonHoverPosition’ Script to a UI button and when you hover over the button the button will move to the set position. The set position is the current buttons pos + the hover position.
Functions#
- UnityUtils.ScriptUtils.UI.UIButtonHoverPosition : MonoBehaviour , IPointerEnterHandler , IPointerExitHandler
Public Members
-
Vector3 hoverLocalPosition#
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).
-
UIButtonDebugSettings debugLogs
Will output a Debug.Log(object) depending on the UIButtonDebugSettings.
-
Vector3 hoverLocalPosition#