You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rnx #rb none #ROBOMERGE-SOURCE: CL 10869240 via CL 10869516 via CL 10869902 #ROBOMERGE-BOT: (v613-10869866) [CL 10870584 by ryan durand in Main branch]
48 lines
1.4 KiB
C++
48 lines
1.4 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "AssetToolsModule.h"
|
|
#include "AssetToolsLog.h"
|
|
#include "AssetTools.h"
|
|
#include "AssetToolsConsoleCommands.h"
|
|
#include "MessageLogInitializationOptions.h"
|
|
#include "MessageLogModule.h"
|
|
|
|
IMPLEMENT_MODULE( FAssetToolsModule, AssetTools );
|
|
DEFINE_LOG_CATEGORY(LogAssetTools);
|
|
|
|
void FAssetToolsModule::StartupModule()
|
|
{
|
|
ConsoleCommands = new FAssetToolsConsoleCommands(*this);
|
|
|
|
AssetToolsPtr = MakeWeakObjectPtr(const_cast<UAssetToolsImpl*>(GetDefault<UAssetToolsImpl>()));
|
|
|
|
// create a message log for the asset tools to use
|
|
FMessageLogModule& MessageLogModule = FModuleManager::LoadModuleChecked<FMessageLogModule>("MessageLog");
|
|
FMessageLogInitializationOptions InitOptions;
|
|
InitOptions.bShowPages = true;
|
|
MessageLogModule.RegisterLogListing("AssetTools", NSLOCTEXT("AssetTools", "AssetToolsLogLabel", "Asset Tools"), InitOptions);
|
|
}
|
|
|
|
void FAssetToolsModule::ShutdownModule()
|
|
{
|
|
AssetToolsPtr = nullptr;
|
|
|
|
if (ConsoleCommands != NULL)
|
|
{
|
|
delete ConsoleCommands;
|
|
ConsoleCommands = NULL;
|
|
}
|
|
|
|
if (FModuleManager::Get().IsModuleLoaded("MessageLog"))
|
|
{
|
|
// unregister message log
|
|
FMessageLogModule& MessageLogModule = FModuleManager::GetModuleChecked<FMessageLogModule>("MessageLog");
|
|
MessageLogModule.UnregisterLogListing("AssetTools");
|
|
}
|
|
}
|
|
|
|
IAssetTools& FAssetToolsModule::Get() const
|
|
{
|
|
return *AssetToolsPtr;
|
|
}
|