You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Cleaned up Blueprint nodes from deprecated functions - Added call guards for BP implemented events on BP nodes - Renamed Named External Data to Context (Object/Data) - Added automatic binding for Context objects - Added UI visualization for Context properties and cleaned up the Input/Ouput visualization - Added compiler errors for missing Input and Context properties #jira UE-156544 UE-147509 #rb Stephen.Holmes [CL 22084585 by mikko mononen in ue5-main branch]
39 lines
1.3 KiB
C++
39 lines
1.3 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "Blueprint/StateTreeConditionBlueprintBase.h"
|
|
#include "CoreMinimal.h"
|
|
#include "StateTreeExecutionContext.h"
|
|
#include "BlueprintNodeHelpers.h"
|
|
|
|
//----------------------------------------------------------------------//
|
|
// UStateTreeConditionBlueprintBase
|
|
//----------------------------------------------------------------------//
|
|
|
|
UStateTreeConditionBlueprintBase::UStateTreeConditionBlueprintBase(const FObjectInitializer& ObjectInitializer)
|
|
: Super(ObjectInitializer)
|
|
{
|
|
bHasTestCondition = BlueprintNodeHelpers::HasBlueprintFunction(TEXT("ReceiveTestCondition"), *this, *StaticClass());
|
|
}
|
|
|
|
bool UStateTreeConditionBlueprintBase::TestCondition(FStateTreeExecutionContext& Context) const
|
|
{
|
|
if (bHasTestCondition)
|
|
{
|
|
FScopedCurrentContext(*this, Context);
|
|
return ReceiveTestCondition();
|
|
}
|
|
return false;
|
|
}
|
|
|
|
//----------------------------------------------------------------------//
|
|
// FStateTreeBlueprintConditionWrapper
|
|
//----------------------------------------------------------------------//
|
|
|
|
bool FStateTreeBlueprintConditionWrapper::TestCondition(FStateTreeExecutionContext& Context) const
|
|
{
|
|
UStateTreeConditionBlueprintBase* Condition = Context.GetInstanceDataPtr<UStateTreeConditionBlueprintBase>(*this);
|
|
check(Condition);
|
|
return Condition->TestCondition(Context);
|
|
}
|
|
|