Skip to content

Commit

Permalink
removed hacky loading all Flow Assets, unused
Browse files Browse the repository at this point in the history
only caused issues with functional tests
  • Loading branch information
MothDoctor committed Dec 18, 2021
1 parent 0c7bab9 commit 9d7df13
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions Source/FlowEditor/Private/Graph/Nodes/FlowGraphNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "FlowAsset.h"
#include "Nodes/FlowNode.h"

#include "AssetRegistryModule.h"
#include "Developer/ToolMenus/Public/ToolMenus.h"
#include "EdGraph/EdGraphSchema.h"
#include "EdGraphSchema_K2.h"
Expand All @@ -20,7 +19,6 @@
#include "Framework/Commands/GenericCommands.h"
#include "GraphEditorActions.h"
#include "Kismet2/KismetEditorUtilities.h"
#include "Modules/ModuleManager.h"
#include "ScopedTransaction.h"
#include "SourceCodeNavigation.h"
#include "Textures/SlateIcon.h"
Expand Down Expand Up @@ -95,8 +93,6 @@ void FFlowBreakpoint::ToggleBreakpoint()
}
}

bool UFlowGraphNode::bFlowAssetsLoaded = false;

//////////////////////////////////////////////////////////////////////////
// Flow Graph Node

Expand Down Expand Up @@ -139,24 +135,6 @@ void UFlowGraphNode::PostLoad()
SubscribeToExternalChanges();
}

// todo: verify if we still need this workaround
// without this reconstructing UFlowNode_SubGraph pins wouldn't work well
if (bFlowAssetsLoaded == false)
{
TArray<FAssetData> FlowAssets;

const FAssetRegistryModule& AssetRegistryModule = FModuleManager::LoadModuleChecked<FAssetRegistryModule>(AssetRegistryConstants::ModuleName);
AssetRegistryModule.Get().GetAssetsByClass(UFlowAsset::StaticClass()->GetFName(), FlowAssets, true);

for (FAssetData const& Asset : FlowAssets)
{
const FString AssetPath = Asset.ObjectPath.ToString();
StaticLoadObject(Asset.GetClass(), nullptr, *AssetPath);
}

bFlowAssetsLoaded = true;
}

ReconstructNode();
}

Expand Down

0 comments on commit 9d7df13

Please sign in to comment.