You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- moved StateTreeBrainComponent (from StateTreeModule) and renamed StateTreeComponent - added FStateTreeTaskCommonBase (similar to FStateTreeTaskCommonCondition) #rnx #rb mikko.mononen #preflight 626fd50d645c64f3a236325a [CL 20007596 by Yoan StAmant in ue5-main branch]
29 lines
1022 B
C++
29 lines
1022 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "Components/StateTreeComponentSchema.h"
|
|
#include "StateTreeConditionBase.h"
|
|
#include "StateTreeEvaluatorBase.h"
|
|
#include "StateTreeTaskBase.h"
|
|
#include "GameFramework/Actor.h"
|
|
#include "Components/ActorComponent.h"
|
|
#include "Subsystems/WorldSubsystem.h"
|
|
|
|
bool UStateTreeComponentSchema::IsStructAllowed(const UScriptStruct* InScriptStruct) const
|
|
{
|
|
return InScriptStruct->IsChildOf(FStateTreeConditionCommonBase::StaticStruct())
|
|
|| InScriptStruct->IsChildOf(FStateTreeEvaluatorCommonBase::StaticStruct())
|
|
|| InScriptStruct->IsChildOf(FStateTreeTaskCommonBase::StaticStruct());
|
|
}
|
|
|
|
bool UStateTreeComponentSchema::IsClassAllowed(const UClass* InClass) const
|
|
{
|
|
return IsChildOfBlueprintBase(InClass);
|
|
}
|
|
|
|
bool UStateTreeComponentSchema::IsExternalItemAllowed(const UStruct& InStruct) const
|
|
{
|
|
return InStruct.IsChildOf(AActor::StaticClass())
|
|
|| InStruct.IsChildOf(UActorComponent::StaticClass())
|
|
|| InStruct.IsChildOf(UWorldSubsystem::StaticClass());
|
|
}
|