Navigation
API > API/Plugins > API/Plugins/GameplayStateTreeModule
| Name | UStateTreeComponent |
| Type | class |
| Header File | /Engine/Plugins/Runtime/GameplayStateTree/Source/GameplayStateTreeModule/Public/Components/StateTreeComponent.h |
| Include Path | #include "Components/StateTreeComponent.h" |
Syntax
UCLASS (MinimalAPI, Blueprintable, ClassGroup=AI, HideCategories=(Activation, Collision),
Meta=(BlueprintSpawnableComponent))
class UStateTreeComponent :
public UBrainComponent ,
public IGameplayTaskOwnerInterface ,
public IStateTreeSchemaProvider
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → UBrainComponent → UStateTreeComponent
Implements Interfaces
- IAIResourceInterface
- IAsyncPhysicsStateProcessor
- IInterface_AssetUserData
- IGameplayTaskOwnerInterface
- IStateTreeSchemaProvider
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UStateTreeComponent
(
const FObjectInitializer& ObjectInitializer |
Components/StateTreeComponent.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| OnStateTreeRunStatusChanged | FStateTreeRunStatusChanged | Called when the run status of the StateTree has changed | Components/StateTreeComponent.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddLinkedStateTreeOverrides
(
const FGameplayTag StateTag, |
Add a linked state tree override. | Components/StateTreeComponent.h |
|
EStateTreeRunStatus GetStateTreeRunStatus() |
Returns the current run status of the StateTree. | Components/StateTreeComponent.h |
|
void RemoveLinkedStateTreeOverrides
(
const FGameplayTag StateTag |
Remove a linked state tree override. | Components/StateTreeComponent.h |
|
void SendStateTreeEvent
(
const FStateTreeEvent& Event |
Sends event to the running StateTree. | Components/StateTreeComponent.h |
|
void SendStateTreeEvent
(
const FGameplayTag Tag, |
Sends event to the running StateTree. | Components/StateTreeComponent.h | |
void SetLinkedStateTreeOverrides
(
FStateTreeReferenceOverrides Overrides |
Set the linked state tree overrides. | Components/StateTreeComponent.h | |
void SetStartLogicAutomatically
(
const bool bInStartLogicAutomatically |
Sets whether the State Tree is started automatically on being play. | Components/StateTreeComponent.h |
|
void SetStateTree
(
UStateTree* StateTree |
Sets a new state tree. The state tree won't be set if the logic is running. | Components/StateTreeComponent.h |
|
void SetStateTreeReference
(
FStateTreeReference StateTreeReference |
Sets a new state tree reference. The state tree reference won't be set if the logic is running. | Components/StateTreeComponent.h |
|
Overridden from UBrainComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Cleanup() |
Components/StateTreeComponent.h | ||
virtual bool IsPaused() |
Components/StateTreeComponent.h | ||
virtual bool IsRunning() |
Components/StateTreeComponent.h | ||
virtual void PauseLogic
(
const FString& Reason |
Components/StateTreeComponent.h | ||
virtual void RestartLogic() |
Components/StateTreeComponent.h | ||
virtual EAILogicResuming::Type ResumeLogic
(
const FString& Reason |
Components/StateTreeComponent.h | ||
virtual void StartLogic() |
Components/StateTreeComponent.h | ||
virtual void StopLogic
(
const FString& Reason |
Components/StateTreeComponent.h |
Overridden from UActorComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginPlay() |
Components/StateTreeComponent.h | ||
virtual void EndPlay
(
const EEndPlayReason::Type EndPlayReason |
Components/StateTreeComponent.h | ||
virtual void InitializeComponent() |
Components/StateTreeComponent.h | ||
virtual void TickComponent
(
float DeltaTime, |
Components/StateTreeComponent.h | ||
virtual void UninitializeComponent() |
Components/StateTreeComponent.h |
Overridden from IGameplayTaskOwnerInterface
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual AActor * GetGameplayTaskAvatar
(
const UGameplayTask* Task |
Components/StateTreeComponent.h | ||
virtual uint8 GetGameplayTaskDefaultPriority() |
Components/StateTreeComponent.h | ||
virtual AActor * GetGameplayTaskOwner
(
const UGameplayTask* Task |
Components/StateTreeComponent.h | ||
virtual UGameplayTasksComponent * GetGameplayTasksComponent
(
const UGameplayTask& Task |
Components/StateTreeComponent.h | ||
virtual void OnGameplayTaskInitialized
(
UGameplayTask& Task |
Components/StateTreeComponent.h |
Overridden from IStateTreeSchemaProvider
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TSubclassOf< UStateTreeSchema > GetSchema() |
Components/StateTreeComponent.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool CollectExternalData
(
const FStateTreeExecutionContext& Context, |
Components/StateTreeComponent.h | ||
void ConditionalEnableTick() |
Components/StateTreeComponent.h | ||
void DisableTick() |
Components/StateTreeComponent.h | ||
virtual TValueOrError< void, FString > HasValidStateTreeReference() |
Components/StateTreeComponent.h | ||
void ScheduleTickFrame
(
const FStateTreeScheduledTick& NextTick |
Components/StateTreeComponent.h | ||
virtual bool SetContextRequirements
(
FStateTreeExecutionContext& Context, |
Components/StateTreeComponent.h | ||
void StartTree() |
Components/StateTreeComponent.h | ||
virtual void ValidateStateTreeReference () |
Called during initialize, will validate the state tree reference and create a context from the state tree to check it's validity Override this function for custom state tree validation. | Components/StateTreeComponent.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostLoad() |
Components/StateTreeComponent.h |
Deprecated Variables
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| StateTree_DEPRECATED | TObjectPtr< UStateTree > | Components/StateTreeComponent.h |