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

Method LoadInstance

Source/Flow/Private/FlowAsset.cpp:1371–1390  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1369}
1370
1371void UFlowAsset::LoadInstance(const FFlowAssetSaveData& AssetRecord)
1372{
1373 FMemoryReader MemoryReader(AssetRecord.AssetData, true);
1374 FFlowArchive Ar(MemoryReader);
1375 Serialize(Ar);
1376
1377 PreStartFlow();
1378
1379 // iterate graph "from the end", backward to execution order
1380 // prevents issue when the preceding node would instantly fire output to a not-yet-loaded node
1381 for (int32 i = AssetRecord.NodeRecords.Num() - 1; i >= 0; i--)
1382 {
1383 if (UFlowNode* Node = Nodes.FindRef(AssetRecord.NodeRecords[i].NodeGuid))
1384 {
1385 Node->LoadInstance(AssetRecord.NodeRecords[i]);
1386 }
1387 }
1388
1389 OnLoad();
1390}
1391
1392void UFlowAsset::OnActivationStateLoaded(UFlowNode* Node)
1393{

Callers 2

LoadRootFlowMethod · 0.45
LoadSubFlowMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected