Files
UnrealEngineUWP/Engine/Source/Editor/BlueprintGraph/Private/BlueprintGraphModule.cpp
nate strohmyer c4b2e38146 Making a Drag/Drop action for Input Actions into the Blueprint Graph
#Jira UE-161947
#rb ben.hoffman
#preflight 635c52813c0af539fd66d17c

[CL 23040016 by nate strohmyer in ue5-main branch]
2022-11-08 16:28:09 -05:00

38 lines
1.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "BlueprintGraphModule.h"
#include "AssetBlueprintGraphActions.h"
#include "EdGraphSchema_K2.h"
#include "BlueprintTypePromotion.h"
#include "Modules/ModuleManager.h"
IMPLEMENT_MODULE( FBlueprintGraphModule, BlueprintGraph );
void FBlueprintGraphModule::ShutdownModule()
{
UEdGraphSchema_K2::Shutdown();
FTypePromotion::Shutdown();
AssetBlueprintGraphActions.Reset();
}
void FBlueprintGraphModule::RegisterGraphAction(const UClass* AssetType, TUniquePtr<FAssetBlueprintGraphActions> Action)
{
ensure(!AssetBlueprintGraphActions.Contains(AssetType));
AssetBlueprintGraphActions.Add(AssetType, MoveTemp(Action));
}
void FBlueprintGraphModule::UnregisterGraphAction(const UClass* AssetType)
{
AssetBlueprintGraphActions.Remove(AssetType);
}
const FAssetBlueprintGraphActions* FBlueprintGraphModule::GetAssetBlueprintGraphActions(const UClass* AssetType) const
{
if (const TUniquePtr<FAssetBlueprintGraphActions>* Actions = AssetBlueprintGraphActions.Find(AssetType))
{
return Actions->Get();
}
return nullptr;
}