You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
* Ran IWYU on all private code in the plugins under this folder. #preflight 63bbb322c45a2c81e0673a9c #rb chris.waters [CL 23631839 by henrik karlsson in ue5-main branch]
46 lines
1.3 KiB
C++
46 lines
1.3 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "AssetDefinition_PoseAsset.h"
|
|
|
|
#define LOCTEXT_NAMESPACE "FEngineAssetDefinitionsModule"
|
|
|
|
class FEngineAssetDefinitionsModule : public IModuleInterface
|
|
{
|
|
public:
|
|
|
|
// IModuleInterface interface
|
|
virtual void StartupModule() override
|
|
{
|
|
// Register asset types... for now
|
|
IAssetTools& AssetTools = FModuleManager::LoadModuleChecked<FAssetToolsModule>("AssetTools").Get();
|
|
RegisterAssetTypeAction(AssetTools, MakeShareable(new FAssetTypeActions_PoseAsset));
|
|
}
|
|
|
|
virtual void ShutdownModule() override
|
|
{
|
|
// Unregister all the asset types that we registered
|
|
if (FModuleManager::Get().IsModuleLoaded("AssetTools"))
|
|
{
|
|
IAssetTools& AssetTools = FModuleManager::GetModuleChecked<FAssetToolsModule>("AssetTools").Get();
|
|
for (int32 Index = 0; Index < CreatedAssetTypeActions.Num(); ++Index)
|
|
{
|
|
AssetTools.UnregisterAssetTypeActions(CreatedAssetTypeActions[Index].ToSharedRef());
|
|
}
|
|
}
|
|
CreatedAssetTypeActions.Empty();
|
|
}
|
|
|
|
private:
|
|
void RegisterAssetTypeAction(IAssetTools& AssetTools, TSharedRef<IAssetTypeActions> Action)
|
|
{
|
|
AssetTools.RegisterAssetTypeActions(Action);
|
|
CreatedAssetTypeActions.Add(Action);
|
|
}
|
|
|
|
TArray<TSharedPtr<IAssetTypeActions>> CreatedAssetTypeActions;
|
|
};
|
|
|
|
#undef LOCTEXT_NAMESPACE
|
|
|
|
IMPLEMENT_MODULE(FEngineAssetDefinitionsModule, EngineAssetDefinitions);
|