Skip to content

UMageItCombatTextRendererUMG

Base Class: UMageItCombatTextRendererBase Interfaces: FTickableGameObject

UMageItCombatTextRendererUMG renders combat text as pooled UMageItCombatTextWidget instances placed directly in the viewport. It is the most flexible renderer — full UMG animation, easy per-widget Blueprint logic — at the cost of one pooled widget per concurrent on-screen number.

Its defining feature is damage accumulation: repeated hits on the same TargetActor update the same widget instead of spawning a new one, growing the displayed number and resetting its fade-out timer.


  • PoolSize (Integer, EditDefaultsOnly, min 1): Number of widgets pre-allocated at Initialize. Default 10.
  • MaxPoolSize (Integer, EditDefaultsOnly, min 0): Hard ceiling on total widget count (including the initial PoolSize) the pool may grow to when exhausted, instead of dropping the damage event. 0 = unbounded growth. Values below PoolSize have no effect.
  • LocationInterpSpeed (Float, EditDefaultsOnly): Interpolation speed used to smoothly move a widget’s tracked world position towards its target. Default 15.0.
  • bTrackActorLocation (Boolean, EditDefaultsOnly): Whether the widget follows its TargetActor as it moves after spawning.
  • bUpdateLocation (Boolean, EditDefaultsOnly): Whether new damage events on an already-active target update its tracked position.
  • bSmoothLocationUpdate (Boolean, EditDefaultsOnly): When a new event updates the position, whether to interpolate towards it (true) or snap immediately (false).
  • ScreenLocationOffset (Vector2D, EditDefaultsOnly): Constant pixel offset applied to the final projected screen position.
  • WidgetClass (TSubclassOf<UMageItCombatTextWidget>, EditDefaultsOnly): The widget class instantiated for the pool.
  • WidgetPool (Array<UMageItCombatTextWidget*>): Widgets available for reuse.
  • ActiveWidgets (Map<WeakObjectPtr<AActor>, FMageItWidgetTrackingData>): Widgets currently assigned to a target actor. See FMageItWidgetTrackingData.

void ReturnWidgetToPool(UMageItCombatTextWidget* Widget);

(Blueprint Callable) Pushes Widget back onto WidgetPool and removes it from ActiveWidgets. Called automatically by UMageItCombatTextWidget::FadeOut — you normally don’t call this directly.


Pre-allocates and hides PoolSize widgets, adding each to the viewport (Collapsed visibility, centered alignment) so later reuse doesn’t pay CreateWidget cost.

Resolves the target actor from EventData.TargetActor, falling back to EventData.HitInfo.GetActor().

  • If the actor already has an active widget, calls UpdateDamage on it (accumulation) and updates its tracked target position according to bUpdateLocation / bSmoothLocationUpdate.
  • Otherwise, pulls a widget from the pool (or grows the pool if under MaxPoolSize) via the internal UseWidget, sets its initial position, and calls FadeIn.
  • If the pool is exhausted and can’t grow, logs a Warning and drops the event.

For every active widget: optionally accumulates the target actor’s movement delta into a target position (bTrackActorLocation), interpolates the widget’s current world position towards it (LocationInterpSpeed), projects that position to screen space via PlayerController->ProjectWorldLocationToScreen, and calls SetPositionInViewport (plus ScreenLocationOffset).

Empties ActiveWidgets and removes every pooled widget from the viewport.