How-To: Play a Custom Widget Animation (Optional)
Goal: add a per-style widget animation (punch-in for crits, gentle rise for heals) on top of - or instead of - the built-in physics motion. Each style config names an animation (FCrimsonNumberPopConfig::AnimationName); the widget reads that name and plays the matching UWidgetAnimation.
UWidgetAnimation per animation name your registry uses (e.g. Anim_Pop, Anim_Crit).1. Override StartPop
Before calling StartPop, the subsystem writes the resolved style's animation name into ActiveAnimationName (BlueprintReadOnly). Override StartPop in your widget Blueprint, call the parent to keep the built-in text setup, motion, fade, and pool return, then play the animation whose name matches.
OnPopFinished broadcasts. The parent implementation does this automatically after PhysicsSettings.Duration. If you skip the parent call to take over the motion entirely, broadcast OnPopFinished yourself when your animation ends - otherwise the widget is never recycled.2. Force-finish with CancelPop
CancelPop (BlueprintCallable) immediately hides the widget and broadcasts OnPopFinished, returning it to the pool. The subsystem uses it to recycle the oldest pop when MaxActivePops is exceeded; call it yourself to cut a pop short (e.g. on the owner's death screen).
Anim_Crit animation while a normal hit plays Anim_Pop - and both widgets are reused on later hits (no widget count growth in the Widget Reflector).See also
- Concept: Styles, Formatting & the Widget Pool - how the style config reaches the widget.
- Quick Start step 2 - authoring
AnimationNameon each style rule.