Files
UnrealEngineUWP/Engine/Plugins/Runtime/GameplayStateTree/Source/GameplayStateTreeModule/Private/Components/StateTreeAIComponent.cpp
guillaume arruda a3f5944e10 Create IStateTreeSchemaProvider that allows a derived class to override the schema used by a parent property.
Create StateTreeAIComponent & StateTreeAIComponentSchema derived from StateTreeComponent but guaranteed to have a AIController
#rb mikko.mononen

[CL 31940750 by guillaume arruda in ue5-main branch]
2024-03-01 07:42:54 -05:00

18 lines
667 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "Components/StateTreeAIComponent.h"
#include "Components/StateTreeAIComponentSchema.h"
#include "StateTreeExecutionContext.h"
TSubclassOf<UStateTreeSchema> UStateTreeAIComponent::GetSchema() const
{
return UStateTreeAIComponentSchema::StaticClass();
}
bool UStateTreeAIComponent::SetContextRequirements(FStateTreeExecutionContext& Context, bool bLogErrors /*= false*/)
{
Context.SetCollectExternalDataCallback(FOnCollectStateTreeExternalData::CreateUObject(this, &UStateTreeAIComponent::CollectExternalData));
return UStateTreeAIComponentSchema::SetContextRequirements(*this, Context, bLogErrors);
}