Skip to main content

HookAnimator Component

While you can use DOTween or Coroutines manually, HookUI provides the HookAnimator: a data-driven, visual animation system designed specifically for UI.

Why use it?​

  • Presets: Create one "Pop Up" animation and reuse it on 50 different panels.
  • Visual Editor: Tweak scale, fade, and position curves in the Inspector.
  • Preview: Test "Show" and "Hide" animations directly in the Editor without hitting Play.

Setup​

  1. Add HookAnimatorComponent to your HookView GameObject.
  2. The HookView will automatically detect it and use it for Show()/Hide() calls (unless you override them manually).

Creating Animations​

You can configure two animations:

  • Show Animation: Played when the View opens.
  • Hide Animation: Played when the View closes.

Properties​

  • Duration: Time in seconds.
  • Delay: Time before starting.
  • Scale: Animate from/to scale (Using AnimationCurves).
  • Fade: Animate CanvasGroup Alpha.
  • Move: Animate AnchoredPosition.

The Preset Workflow​

This is the "OP" feature. Instead of configuring values on every GameObject:

  1. Configure your perfect animation on one object.
  2. Use the context menu or button: Export SHOW to New Asset.
  3. Save it as Anim_SimplePop.asset.
  4. Reuse: On another object, drag Anim_SimplePop into the Target Preset field.
  5. Click Load Preset into SHOW.

Boom! Instant consistent animations across your entire game.

Previewing​

Use the slider in the Inspector (when implemented in custom editor) or the Context Menu buttons (Play Show, Play Hide) to preview the feel of the animation instantly.