You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- connect GetWorld() of FStateTreeExecutionContext explicitly to the owner - take MassSignalSubsystem as parameter to FMassStateTreeExecutionContext directly - separated DataViewIndex (what others see) and InstanceIndex/bInstanceIsObject (where the pointert comes from) on StateTree items - allow item instance to be a struct or object - added editor support for both struct or object based instance - added Blueprint base classes for Eval, Task and Condition - Update UStateTreeBrainComponent #jira UE-135723 #ROBOMERGE-AUTHOR: mikko.mononen #ROBOMERGE-SOURCE: CL 18280804 in //UE5/Main/... #ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v895-18170469) #ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0 [CL 18280809 by mikko mononen in ue5-release-engine-test branch]
41 lines
1.4 KiB
C++
41 lines
1.4 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "Blueprint/StateTreeConditionBlueprintBase.h"
|
|
#include "CoreMinimal.h"
|
|
#include "StateTreeExecutionContext.h"
|
|
|
|
//----------------------------------------------------------------------//
|
|
// UStateTreeConditionBlueprintBase
|
|
//----------------------------------------------------------------------//
|
|
|
|
bool UStateTreeConditionBlueprintBase::TestCondition(FStateTreeExecutionContext& Context)
|
|
{
|
|
AActor* OwnerActor = GetOwnerActor(Context);
|
|
return ReceiveTestCondition(OwnerActor);
|
|
}
|
|
|
|
//----------------------------------------------------------------------//
|
|
// FStateTreeBlueprintConditionWrapper
|
|
//----------------------------------------------------------------------//
|
|
|
|
bool FStateTreeBlueprintConditionWrapper::Link(FStateTreeLinker& Linker)
|
|
{
|
|
const UStateTreeConditionBlueprintBase* CondCDO = ConditionClass ? ConditionClass->GetDefaultObject<UStateTreeConditionBlueprintBase>() : nullptr;
|
|
if (CondCDO != nullptr)
|
|
{
|
|
CondCDO->LinkExternalData(Linker, ExternalDataHandles);
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
bool FStateTreeBlueprintConditionWrapper::TestCondition(FStateTreeExecutionContext& Context) const
|
|
{
|
|
if (UStateTreeConditionBlueprintBase* Instance = Context.GetInstanceObjectInternal<UStateTreeConditionBlueprintBase>(DataViewIndex))
|
|
{
|
|
Instance->CopyExternalData(Context, ExternalDataHandles);
|
|
return Instance->TestCondition(Context);
|
|
}
|
|
return false;
|
|
}
|