UBTService_ReadAbilityState
Overview
UBTService_ReadAbilityState is a Behavior Tree service designed to read whether an ability instance is currently active and store this information in a specified blackboard key. It inherits from UBTService and overrides several lifecycle events to perform its primary function.
Properties
Type | Name | Access | Description |
|---|---|---|---|
FBlackboardKeySelector | KeyToStoreValue | EditAnywhere | The blackboard key where the ability's active state will be stored. |
FBlackboardKeySelector | AbilityInstanceKey | EditAnywhere | The blackboard key that contains the reference to the ability instance whose state is being checked. |
Functions
Return Type | Signature | Description |
|---|---|---|
void | InitializeFromAsset(UBehaviorTree& Asset) | Initializes the service with the behavior tree asset, resolving the selected keys for |
void | OnBecomeRelevant(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) | Called when the service becomes relevant. Currently empty but can be used to perform initialization tasks. |
void | TickNode(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, float DeltaSeconds) | Ticks the node every frame. Reads the ability instance from the blackboard and updates the |
Usage & Implementation Notes
Threading Constraints: This service should be used in a single-threaded context as it interacts with the Behavior Tree component.
Replication Requirements: Not applicable for this stateless utility.
Memory Lifetime Management: The service does not manage any dynamic memory and relies on the lifetime of the behavior tree and blackboard components.
Initialization Dependencies: Depends on
AbilityInstanceKeybeing set in the blackboard to correctly read the ability instance.