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

Method LoadRootFlow

Source/Flow/Private/FlowSubsystem.cpp:434–454  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

432}
433
434void UFlowSubsystem::LoadRootFlow(UObject* Owner, UFlowAsset* FlowAsset, const FString& SavedAssetInstanceName, const bool bAllowMultipleInstances)
435{
436 if (FlowAsset == nullptr || SavedAssetInstanceName.IsEmpty())
437 {
438 return;
439 }
440
441 for (const FFlowAssetSaveData& AssetRecord : LoadedSaveGame->FlowInstances)
442 {
443 if (AssetRecord.InstanceName == SavedAssetInstanceName
444 && (FlowAsset->IsBoundToWorld() == false || AssetRecord.WorldName == GetWorld()->GetName()))
445 {
446 UFlowAsset* LoadedInstance = CreateRootFlow(Owner, FlowAsset, bAllowMultipleInstances);
447 if (LoadedInstance)
448 {
449 LoadedInstance->LoadInstance(AssetRecord);
450 }
451 return;
452 }
453 }
454}
455
456void UFlowSubsystem::LoadSubFlow(UFlowNode_SubGraph* SubGraphNode, const FString& SavedAssetInstanceName)
457{

Callers

nothing calls this directly

Calls 3

IsEmptyMethod · 0.80
GetNameMethod · 0.45
LoadInstanceMethod · 0.45

Tested by

no test coverage detected