UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
DataflowVariableNodes.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
6
7#include "DataflowVariableNodes.generated.h"
8
9class UDataflow;
10class UObject;
13
14USTRUCT()
16{
18 DATAFLOW_NODE_DEFINE_INTERNAL(FGetDataflowVariableNode, "GetVariable", "Dataflow", "")
19
20public:
23
24 DATAFLOWENGINE_API void SetVariable(UDataflow* DataflowAsset, FName VariableName);
25 DATAFLOWENGINE_API bool TryAddVariableToDataflowAsset(UDataflow& DataflowAsset);
26
27 FName GetVariableName() const { return VariableName; }
28
29private:
30 UPROPERTY(meta=(DataflowOutput))
32
33 // Called when UPROPERTY members of the dataflow node have been changed in the editor
34 virtual void OnPropertyChanged(UE::Dataflow::FContext& Context, const FPropertyChangedEvent& InPropertyChangedEvent) override;
35
37 virtual void PostSerialize(const FArchive& Ar);
38
39 virtual void Evaluate(UE::Dataflow::FContext& Context, const FDataflowOutput* Out) const;
40
41 static void EvaluateBool(const FGetDataflowVariableNode& Node, const FInstancedPropertyBag& Variables, UE::Dataflow::FContext& Context, const FDataflowOutput& Out);
42 static void EvaluateByte(const FGetDataflowVariableNode& Node, const FInstancedPropertyBag& Variables, UE::Dataflow::FContext& Context, const FDataflowOutput& Out);
43 static void EvaluateInt32(const FGetDataflowVariableNode& Node, const FInstancedPropertyBag& Variables, UE::Dataflow::FContext& Context, const FDataflowOutput& Out);
44 static void EvaluateInt64(const FGetDataflowVariableNode& Node, const FInstancedPropertyBag& Variables, UE::Dataflow::FContext& Context, const FDataflowOutput& Out);
45 static void EvaluateFloat(const FGetDataflowVariableNode& Node, const FInstancedPropertyBag& Variables, UE::Dataflow::FContext& Context, const FDataflowOutput& Out);
46 static void EvaluateDouble(const FGetDataflowVariableNode& Node, const FInstancedPropertyBag& Variables, UE::Dataflow::FContext& Context, const FDataflowOutput& Out);
47 static void EvaluateName(const FGetDataflowVariableNode& Node, const FInstancedPropertyBag& Variables, UE::Dataflow::FContext& Context, const FDataflowOutput& Out);
48 static void EvaluateString(const FGetDataflowVariableNode& Node, const FInstancedPropertyBag& Variables, UE::Dataflow::FContext& Context, const FDataflowOutput& Out);
49 static void EvaluateText(const FGetDataflowVariableNode& Node, const FInstancedPropertyBag& Variables, UE::Dataflow::FContext& Context, const FDataflowOutput& Out);
50 static void EvaluateObject(const FGetDataflowVariableNode& Node, const FInstancedPropertyBag& Variables, UE::Dataflow::FContext& Context, const FDataflowOutput& Out);
51 static void EvaluateStruct(const FGetDataflowVariableNode& Node, const FInstancedPropertyBag& Variables, UE::Dataflow::FContext& Context, const FDataflowOutput& Out);
52
53 void UpdateOutputTypes(const FPropertyBagPropertyDesc& Desc);
54 void ChangeOutputType(FDataflowOutput* Output, FName NewType);
55
56private:
57 UPROPERTY(EditAnywhere, Category = "Default Value", meta = (FixedLayout, ShowOnlyInnerProperties))
58 FInstancedPropertyBag VariablePropertyBag;
59
60 UPROPERTY(VisibleAnywhere, Category = Variable )
61 FName VariableName;
62
63 void RegisterHandlers();
64 void UnregisterHandlers();
65
66 using FStaticEvaluationFunctionPtr = void(*)(const FGetDataflowVariableNode&, const FInstancedPropertyBag&, UE::Dataflow::FContext&, const FDataflowOutput&);
67 FStaticEvaluationFunctionPtr EvaluateFunction = nullptr;
68
70
71 void OnObjectPropertyChanged(UObject* InObject, FPropertyChangedEvent& InPropertyChangedEvent);
72
73 TWeakObjectPtr<UDataflow> WeakDataflowPtr;
74
75};
76
77namespace UE::Dataflow
78{
80}
81
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define DATAFLOW_NODE_DEFINE_INTERNAL(TYPE, DISPLAY_NAME, CATEGORY, TAGS)
Definition DataflowNode.h:951
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define USTRUCT(...)
Definition ObjectMacros.h:746
#define GENERATED_USTRUCT_BODY(...)
Definition ObjectMacros.h:767
EPropertyBagContainerType
Definition PropertyBag.h:45
Definition Archive.h:1208
Definition NameTypes.h:617
Definition DataflowObject.h:106
Definition DataflowNodeParameters.h:134
Definition Object.h:95
Definition DataflowAnyType.cpp:10
void RegisterVariableNodes()
Definition DataflowVariableNodes.cpp:14
Definition DataflowAnyType.h:13
Definition DataflowNode.h:52
Definition DataflowInputOutput.h:149
Definition DataflowVariableNodes.h:16
FName GetVariableName() const
Definition DataflowVariableNodes.h:27
Definition Guid.h:109
static CORE_API FGuid NewGuid()
Definition Guid.cpp:236
Definition PropertyBag.h:418
Definition PropertyBag.h:249
Definition UnrealType.h:6865
Definition WeakObjectPtrTemplates.h:25
Definition DataflowNode.h:22