| 1261 | } |
| 1262 | |
| 1263 | void UFlowAsset::FinishNode(UFlowNode* Node) |
| 1264 | { |
| 1265 | if (ActiveNodes.Contains(Node)) |
| 1266 | { |
| 1267 | ActiveNodes.Remove(Node); |
| 1268 | |
| 1269 | // if graph reached Finish and this asset instance was created by SubGraph node |
| 1270 | if (Node->CanFinishGraph()) |
| 1271 | { |
| 1272 | if (NodeOwningThisAssetInstance.IsValid()) |
| 1273 | { |
| 1274 | NodeOwningThisAssetInstance.Get()->TriggerFirstOutput(true); |
| 1275 | |
| 1276 | return; |
| 1277 | } |
| 1278 | |
| 1279 | // if this instance is a Root Flow, we need to deregister it from the subsystem first |
| 1280 | if (Owner.IsValid()) |
| 1281 | { |
| 1282 | const TSet<UFlowAsset*>& RootFlowInstances = GetFlowSubsystem()->GetRootInstancesByOwner(Owner.Get()); |
| 1283 | if (RootFlowInstances.Contains(this)) |
| 1284 | { |
| 1285 | GetFlowSubsystem()->FinishRootFlow(Owner.Get(), TemplateAsset, EFlowFinishPolicy::Keep); |
| 1286 | |
| 1287 | return; |
| 1288 | } |
| 1289 | } |
| 1290 | |
| 1291 | FinishFlow(EFlowFinishPolicy::Keep); |
| 1292 | } |
| 1293 | } |
| 1294 | } |
| 1295 | |
| 1296 | void UFlowAsset::ResetNodes() |
| 1297 | { |
no test coverage detected