Files
UnrealEngineUWP/Engine/Source/Runtime/AssetRegistry/Private/AssetRegistryModule.cpp
Ben Marsh ea340d3fbf Copying //UE4/Fortnite-Staging to Dev-Main (//UE4/Dev-Main)
#rb none
#lockdown Nick.Penwarden

[CL 4567513 by Ben Marsh in Main branch]
2018-11-14 19:05:13 -05:00

37 lines
801 B
C++

// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved.
#include "AssetRegistryModule.h"
#include "AssetRegistry.h"
#include "AssetRegistryConsoleCommands.h"
IMPLEMENT_MODULE( FAssetRegistryModule, AssetRegistry );
void FAssetRegistryModule::StartupModule()
{
LLM_SCOPE(ELLMTag::AssetRegistry);
AssetRegistry = MakeWeakObjectPtr(const_cast<UAssetRegistryImpl*>(GetDefault<UAssetRegistryImpl>()));
ConsoleCommands = new FAssetRegistryConsoleCommands(*this);
}
void FAssetRegistryModule::ShutdownModule()
{
AssetRegistry = nullptr;
if ( ConsoleCommands )
{
delete ConsoleCommands;
ConsoleCommands = NULL;
}
}
IAssetRegistry& FAssetRegistryModule::Get() const
{
UAssetRegistryImpl* AssetRegistryPtr = AssetRegistry.Get();
check(AssetRegistryPtr);
return *AssetRegistryPtr;
}