You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#jira UE-146925 #review-19478890 - Added ability to combine conditions into expressions - Added editor UI for the expressions - Replaced condition description with a name (makes the expressions faster to skim) #preflight 62417309361866e20ffa6320 [CL 19524558 by mikko mononen in ue5-main branch]
47 lines
1.3 KiB
C++
47 lines
1.3 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Templates/SubclassOf.h"
|
|
#include "StateTreeTypes.h"
|
|
#include "StateTreeConditionBase.h"
|
|
#include "StateTreePropertyBindings.h"
|
|
#include "StateTreeItemBlueprintBase.h"
|
|
#include "StateTreeConditionBlueprintBase.generated.h"
|
|
|
|
struct FStateTreeExecutionContext;
|
|
|
|
/*
|
|
* Base class for Blueprint based Conditions.
|
|
*/
|
|
UCLASS(Abstract, Blueprintable)
|
|
class STATETREEMODULE_API UStateTreeConditionBlueprintBase : public UStateTreeItemBlueprintBase
|
|
{
|
|
GENERATED_BODY()
|
|
public:
|
|
|
|
UFUNCTION(BlueprintImplementableEvent)
|
|
bool ReceiveTestCondition(AActor* OwnerActor);
|
|
|
|
virtual bool TestCondition(FStateTreeExecutionContext& Context);
|
|
};
|
|
|
|
/**
|
|
* Wrapper for Blueprint based Conditions.
|
|
*/
|
|
USTRUCT()
|
|
struct STATETREEMODULE_API FStateTreeBlueprintConditionWrapper : public FStateTreeConditionBase
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
virtual const UStruct* GetInstanceDataType() const override { return ConditionClass; };
|
|
virtual bool Link(FStateTreeLinker& Linker) override;
|
|
virtual bool TestCondition(FStateTreeExecutionContext& Context) const override;
|
|
|
|
UPROPERTY()
|
|
TSubclassOf<UStateTreeConditionBlueprintBase> ConditionClass = nullptr;
|
|
|
|
TArray<FStateTreeBlueprintExternalDataHandle> ExternalDataHandles;
|
|
};
|