Navigation
API > API/Plugins > API/Plugins/GameplayStateTreeModule > API/Plugins/GameplayStateTreeModule/Components
Inheritance Hierarchy
- UBrainComponent
- IGameplayTaskOwnerInterface
- IStateTreeSchemaProvider
- UStateTreeComponent
- UStateTreeAIComponent
References
| Module | GameplayStateTreeModule |
| Header | /Engine/Plugins/Runtime/GameplayStateTree/Source/GameplayStateTreeModule/Public/Components/StateTreeComponent.h |
| Include | #include "Components/StateTreeComponent.h" |
Syntax
UCLASS (ClassGroup=AI, HideCategories=(Activation, Collision), Meta=(BlueprintSpawnableComponent))
class UStateTreeComponent :
public UBrainComponent,
public IGameplayTaskOwnerInterface ,
public IStateTreeSchemaProvider
Variables
| Type | Name | Description | |
|---|---|---|---|
| uint8: 1 | bIsPaused | If set, execution requests will be postponed | |
| uint8: 1 | bIsRunning | If set, state tree execution is allowed | |
| bool | bStartLogicAutomatically | If true, the StateTree logic is started on begin play. | |
| FStateTreeInstanceData | InstanceData | ||
| FStateTreeReferenceOverrides | LinkedStateTreeOverrides | Overrides for linked State Trees. | |
| FStateTreeRunStatusChanged | OnStateTreeRunStatusChanged | Called when the run status of the StateTree has changed | |
| FStateTreeReference | StateTreeRef | State Tree asset to run on the component. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UStateTreeComponent
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | BeginPlay () |
||
| void | Cleanup () |
||
| bool | CollectExternalData
(
const FStateTreeExecutionContext& Context, |
||
| void | EndPlay
(
const EEndPlayReason::Type EndPlayReason |
||
| EStateTreeRunStatus | Returns the current run status of the StateTree. | ||
| void | |||
| bool | IsPaused () |
||
| bool | IsRunning () |
||
| void | PauseLogic
(
const FString& Reason |
||
| void | PostLoad () |
||
| void | RestartLogic () |
||
| EAILogicResuming::Type | ResumeLogic
(
const FString& Reason |
||
| void | SendStateTreeEvent
(
const FStateTreeEvent& Event |
Sends event to the running StateTree. | |
| void | SendStateTreeEvent
(
const FGameplayTag Tag, |
Sends event to the running StateTree. | |
| bool | SetContextRequirements
(
FStateTreeExecutionContext& Context, |
||
| void | SetStartLogicAutomatically
(
const bool bInStartLogicAutomatically |
Sets whether the State Tree is started automatically on being play. | |
| void | StartLogic () |
||
| void | |||
| void | TickComponent
(
float DeltaTime, |
||
| void |
Overridden from IGameplayTaskOwnerInterface
| Type | Name | Description | |
|---|---|---|---|
| AActor * | GetGameplayTaskAvatar
(
const UGameplayTask* Task |
Get "body" of task's owner / default, having location in world (e.g. Owner = AIController, Avatar = Pawn) | |
| uint8 | Get default priority for running a task | ||
| AActor * | GetGameplayTaskOwner
(
const UGameplayTask* Task |
Get owner of a task or default one when task is null | |
| UGameplayTasksComponent * | GetGameplayTasksComponent
(
const UGameplayTask& Task |
Finds tasks component for given GameplayTask, Task.GetGameplayTasksComponent() may not be initialized at this point! | |
| void | OnGameplayTaskInitialized
(
UGameplayTask& Task |
Notify called after GameplayTask finishes initialization (not active yet) |
Overridden from IStateTreeSchemaProvider
| Type | Name | Description | |
|---|---|---|---|
| TSubclassOf< UStateTreeSchema > | GetSchema () |
Deprecated Variables
| Type | Name | Description | |
|---|---|---|---|
| TObjectPtr< UStateTree > | StateTree_DEPRECATED |