MCPcopy Create free account
hub / github.com/MothCocoon/FlowGraph / InitializeInstance

Method InitializeInstance

Source/Flow/Private/Nodes/FlowNodeBase.cpp:69–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69void UFlowNodeBase::InitializeInstance()
70{
71 IFlowCoreExecutableInterface::InitializeInstance();
72
73 if (!AddOns.IsEmpty())
74 {
75 TArray<UFlowNodeAddOn*> SourceAddOns = AddOns;
76 AddOns.Reset();
77
78 for (UFlowNodeAddOn* SourceAddOn : SourceAddOns)
79 {
80 // Create a new instance of each AddOn
81 if (IsValid(SourceAddOn))
82 {
83 UFlowNodeAddOn* NewAddOnInstance = NewObject<UFlowNodeAddOn>(this, SourceAddOn->GetClass(), NAME_None, RF_Transient, SourceAddOn, false, nullptr);
84 AddOns.Add(NewAddOnInstance);
85 }
86 else
87 {
88 LogError(FString::Printf(TEXT("Null AddOn found in node %s"), *GetName()), EFlowOnScreenMessageType::Permanent);
89 }
90 }
91
92 for (UFlowNodeAddOn* AddOn : AddOns)
93 {
94 // Initialize all the AddOn instances after they are all allocated
95 AddOn->InitializeInstance();
96 }
97 }
98}
99
100void UFlowNodeBase::DeinitializeInstance()
101{

Callers

nothing calls this directly

Calls 4

IsValidFunction · 0.85
IsEmptyMethod · 0.80
ResetMethod · 0.80
InitializeInstanceFunction · 0.50

Tested by

no test coverage detected