UActorComponent::IsComponentTickEnabled
#include "Components/ActorComponent.h"
Access: public
Specifiers: virtualUFUNCTIONBlueprintCallable
Description
Returns whether this component's primary tick function is currently enabled.
Caveats & Gotchas
- • Returns the enabled state of PrimaryComponentTick only. Additional or secondary tick functions registered on the component may have independent enabled states not reflected by this query.
- • A component can have its tick enabled but still not tick if the owning actor's tick is disabled or the world is paused and bTickEvenWhenPaused is false.
Signature
UFUNCTION(BlueprintCallable, Category="Components|Tick")
ENGINE_API virtual bool IsComponentTickEnabled() const Return Type
bool Example
Toggling tick only when needed C++
void UMyComponent::StartProcessing()
{
if (!IsComponentTickEnabled())
{
SetComponentTickEnabled(true);
}
}
void UMyComponent::StopProcessing()
{
if (IsComponentTickEnabled())
{
SetComponentTickEnabled(false);
}
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?