RealDocs

UAbilitySystemComponent::GetShouldTick

function GameplayAbilities Since 4.20
#include "AbilitySystemComponent.h"
Access: public Specifiers: virtualoverrideconst

Description

Returns whether the ASC needs to tick this frame. The ASC dynamically enables ticking only when there are active gameplay effects with durations or active tasks requiring it.

Caveats & Gotchas

  • Do not call this to check whether the component has active work — it is a UActorComponent tick-scheduling hook invoked by the engine each frame. Query active effects or tasks directly instead.
  • Overriding to always return true forces the ASC to tick every frame regardless of whether it has work to do, which increases CPU cost on maps with many characters.

Signature

virtual bool GetShouldTick() const override

Return Type

bool

Example

Subclass that forces ticking for a custom timer system C++
bool UMyAbilitySystemComponent::GetShouldTick() const
{
    // Keep ticking if we have a pending custom cooldown,
    // otherwise let the base class decide.
    return bHasPendingCooldown || Super::GetShouldTick();
}

Version History

Introduced in: 4.20

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.