Files
UnrealEngineUWP/Engine/Plugins/Runtime/GeometryCache/Source/GeometryCacheEd/Private/GeometryCacheEdModule.cpp
anousack kitisa cd5b2910c4 Added LLM tags for GeometryCache and Alembic allocations.
#jira UE-152476
#rb Johan.Duparc
#preflight 631a3c98ec45fbf3d73e8198

[CL 21921658 by anousack kitisa in ue5-main branch]
2022-09-09 11:36:22 -04:00

43 lines
1.5 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "GeometryCacheEdModule.h"
#include "ThumbnailRendering/ThumbnailManager.h"
#include "ComponentAssetBroker.h"
#include "AssetToolsModule.h"
#include "AssetTypeActions_GeometryCache.h"
#include "GeometryCacheAssetBroker.h"
#include "GeometryCache.h"
#include "GeometryCacheComponent.h"
#include "GeometryCacheModule.h"
#include "GeometryCacheThumbnailRenderer.h"
IMPLEMENT_MODULE(FGeometryCacheEdModule, GeometryCacheEd)
void FGeometryCacheEdModule::StartupModule()
{
LLM_SCOPE_BYTAG(GeometryCache);
FAssetToolsModule& AssetToolsModule = FAssetToolsModule::GetModule();
IAssetTools& AssetTools = AssetToolsModule.Get();
AssetAction = new FAssetTypeActions_GeometryCache();
AssetTools.RegisterAssetTypeActions(MakeShareable(AssetAction));
AssetBroker = new FGeometryCacheAssetBroker();
FComponentAssetBrokerage::RegisterBroker(MakeShareable(AssetBroker), UGeometryCacheComponent::StaticClass(), true, true);
UThumbnailManager::Get().RegisterCustomRenderer(UGeometryCache::StaticClass(), UGeometryCacheThumbnailRenderer::StaticClass());
}
void FGeometryCacheEdModule::ShutdownModule()
{
if (UObjectInitialized())
{
FAssetToolsModule& AssetToolsModule = FAssetToolsModule::GetModule();
IAssetTools& AssetTools = AssetToolsModule.Get();
AssetTools.UnregisterAssetTypeActions(AssetAction->AsShared());
FComponentAssetBrokerage::UnregisterBroker(MakeShareable(AssetBroker));
UThumbnailManager::Get().UnregisterCustomRenderer(UGeometryCache::StaticClass());
}
}