Quick answer: Constructor: PrimaryComponentTick.bCanEverTick = true. Or runtime SetComponentTickEnabled(true).
Custom UActorComponent has TickComponent override. Never called. Default tick disabled.
The Fix
UMyComponent::UMyComponent() {
PrimaryComponentTick.bCanEverTick = true;
PrimaryComponentTick.bStartWithTickEnabled = true;
PrimaryComponentTick.TickInterval = 0.0; // every frame
}
void UMyComponent::TickComponent(float Dt, ELevelTick TickType, FActorComponentTickFunction* This) {
Super::TickComponent(Dt, TickType, This);
// fires now
}
Without bCanEverTick, the framework skips registration. Set in constructor for ECS-style components.
Verifying
Tick fires per frame on the component. Profiler shows it.
&ihellip;
“Enable tick. Component runs.”
Related Issues
For Tick after pause, see pause. For Construction loop, see construction.
bCanEverTick. Component ticks.