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]
48 lines
1.2 KiB
C++
48 lines
1.2 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Templates/SubclassOf.h"
|
|
#include "StateTreeConditionBase.h"
|
|
#include "StateTreeNodeBlueprintBase.h"
|
|
#include "StateTreeConditionBlueprintBase.generated.h"
|
|
|
|
struct FStateTreeExecutionContext;
|
|
|
|
/*
|
|
* Base class for Blueprint based Conditions.
|
|
*/
|
|
UCLASS(Abstract, Blueprintable)
|
|
class STATETREEMODULE_API UStateTreeConditionBlueprintBase : public UStateTreeNodeBlueprintBase
|
|
{
|
|
GENERATED_BODY()
|
|
public:
|
|
UStateTreeConditionBlueprintBase(const FObjectInitializer& ObjectInitializer);
|
|
|
|
UFUNCTION(BlueprintImplementableEvent)
|
|
bool ReceiveTestCondition() const;
|
|
|
|
protected:
|
|
virtual bool TestCondition(FStateTreeExecutionContext& Context) const;
|
|
|
|
friend struct FStateTreeBlueprintConditionWrapper;
|
|
|
|
uint8 bHasTestCondition : 1;
|
|
};
|
|
|
|
/**
|
|
* Wrapper for Blueprint based Conditions.
|
|
*/
|
|
USTRUCT()
|
|
struct STATETREEMODULE_API FStateTreeBlueprintConditionWrapper : public FStateTreeConditionBase
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
virtual const UStruct* GetInstanceDataType() const override { return ConditionClass; };
|
|
virtual bool TestCondition(FStateTreeExecutionContext& Context) const override;
|
|
|
|
UPROPERTY()
|
|
TSubclassOf<UStateTreeConditionBlueprintBase> ConditionClass = nullptr;
|
|
};
|