You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- base class for StateTree tasks (GameplayInteractionStateTreeTask) - GameplayInteractions StateTree schema - supports StateTree common Tasks, Evaluators and Conditions + GameplayInteraction Tasks - requires two named external data items (Interactable actor and SmartObject claimed handle) - GameplayInteraction specific SmartObjectBehaviorDefinition to execute a StateTree - First pass of ContextualAnimStateTreeTask to play a scene from a ContextualAnimation scene asset #rnx #rb mikko.mononen #preflight 627510442e58cb727d38e384 [CL 20074106 by Yoan StAmant in ue5-main branch]
40 lines
1.6 KiB
C++
40 lines
1.6 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "GameplayInteractionStateTreeSchema.h"
|
|
#include "GameplayInteractionsTypes.h"
|
|
#include "SmartObjectRuntime.h"
|
|
#include "StateTreeConditionBase.h"
|
|
#include "StateTreeEvaluatorBase.h"
|
|
#include "StateTreeTaskBase.h"
|
|
#include "GameFramework/Actor.h"
|
|
#include "Components/ActorComponent.h"
|
|
#include "Subsystems/WorldSubsystem.h"
|
|
|
|
UGameplayInteractionStateTreeSchema::UGameplayInteractionStateTreeSchema()
|
|
: NamedExternalDataDescs({
|
|
{UE::GameplayInteraction::Names::InteractableActor, AActor::StaticClass(), FGuid(TEXT("870E433F-9931-4B95-982B-78B01B63BBD1"))},
|
|
{UE::GameplayInteraction::Names::SmartObjectClaimedHandle, FSmartObjectClaimHandle::StaticStruct(), FGuid(TEXT("13BAB427-26DB-4A4A-BD5F-937EDB39F841"))}
|
|
})
|
|
{
|
|
}
|
|
|
|
bool UGameplayInteractionStateTreeSchema::IsStructAllowed(const UScriptStruct* InScriptStruct) const
|
|
{
|
|
return InScriptStruct->IsChildOf(FStateTreeConditionCommonBase::StaticStruct())
|
|
|| InScriptStruct->IsChildOf(FStateTreeEvaluatorCommonBase::StaticStruct())
|
|
|| InScriptStruct->IsChildOf(FStateTreeTaskCommonBase::StaticStruct())
|
|
|| InScriptStruct->IsChildOf(FGameplayInteractionStateTreeTask::StaticStruct());
|
|
}
|
|
|
|
bool UGameplayInteractionStateTreeSchema::IsClassAllowed(const UClass* InClass) const
|
|
{
|
|
return IsChildOfBlueprintBase(InClass);
|
|
}
|
|
|
|
bool UGameplayInteractionStateTreeSchema::IsExternalItemAllowed(const UStruct& InStruct) const
|
|
{
|
|
return InStruct.IsChildOf(AActor::StaticClass())
|
|
|| InStruct.IsChildOf(UActorComponent::StaticClass())
|
|
|| InStruct.IsChildOf(UWorldSubsystem::StaticClass());
|
|
}
|