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

Method LoadSubFlow

Source/Flow/Private/FlowSubsystem.cpp:456–478  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

454}
455
456void UFlowSubsystem::LoadSubFlow(UFlowNode_SubGraph* SubGraphNode, const FString& SavedAssetInstanceName)
457{
458 if (SubGraphNode->Asset.IsNull())
459 {
460 return;
461 }
462
463 UFlowAsset* SubGraphAsset = SubGraphNode->Asset.LoadSynchronous();
464
465 for (const FFlowAssetSaveData& AssetRecord : LoadedSaveGame->FlowInstances)
466 {
467 if (AssetRecord.InstanceName == SavedAssetInstanceName
468 && ((SubGraphAsset && SubGraphAsset->IsBoundToWorld() == false) || AssetRecord.WorldName == GetWorld()->GetName()))
469 {
470 UFlowAsset* LoadedInstance = CreateSubFlow(SubGraphNode, SavedAssetInstanceName);
471 if (LoadedInstance)
472 {
473 LoadedInstance->LoadInstance(AssetRecord);
474 }
475 return;
476 }
477 }
478}
479
480void UFlowSubsystem::RegisterComponent(UFlowComponent* Component)
481{

Callers 1

OnLoad_ImplementationMethod · 0.80

Calls 2

GetNameMethod · 0.45
LoadInstanceMethod · 0.45

Tested by

no test coverage detected