RealDocs

UAbilitySystemComponent::InitializeComponent

function GameplayAbilities Since 4.15
#include "AbilitySystemComponent.h"
Access: public Specifiers: virtualoverride

Description

Called when the component is registered and initialized. The ASC uses this to set up its internal attribute subobjects and register them with the actor.

Caveats & Gotchas

  • Always call Super::InitializeComponent() if you override this — skipping it leaves the ASC in an uninitialized state that will crash at runtime.
  • Attribute sets declared as UPROPERTY subobjects on the owning actor or ASC subclass are automatically detected and added here; you do not need to call AddSet() for them.

Signature

virtual void InitializeComponent() override

Return Type

void

Example

Calling super in a subclass override C++
void UMyAbilitySystemComponent::InitializeComponent()
{
    Super::InitializeComponent();
    // Custom initialization after ASC is ready
}

Version History

Introduced in: 4.15

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.