| 67 | } |
| 68 | |
| 69 | void 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 | |
| 100 | void UFlowNodeBase::DeinitializeInstance() |
| 101 | { |
nothing calls this directly
no test coverage detected