Files
UnrealEngine/Engine/Plugins/AI/MLAdapter/Source/MLAdapter/Private/MLAdapterModule.cpp
Brandyn / Techy fcc1b09210 init
2026-04-04 15:40:51 -05:00

40 lines
1.2 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "MLAdapterModule.h"
#include "Managers/MLAdapterManager.h"
#if WITH_GAMEPLAY_DEBUGGER
#include "GameplayDebugger.h"
#include "Debug/GameplayDebuggerCategory_MLAdapter.h"
#endif // WITH_GAMEPLAY_DEBUGGER
class FMLAdapterModule : public IMLAdapterModule
{
/** IModuleInterface implementation */
virtual void StartupModule() override;
virtual void ShutdownModule() override;
};
IMPLEMENT_MODULE( FMLAdapterModule, MLAdapter )
void FMLAdapterModule::StartupModule()
{
#if WITH_GAMEPLAY_DEBUGGER
IGameplayDebugger& GameplayDebuggerModule = IGameplayDebugger::Get();
GameplayDebuggerModule.RegisterCategory("MLAdapter", IGameplayDebugger::FOnGetCategory::CreateStatic(&FGameplayDebuggerCategory_MLAdapter::MakeInstance), EGameplayDebuggerCategoryState::EnabledInGameAndSimulate);
GameplayDebuggerModule.NotifyCategoriesChanged();
#endif
}
void FMLAdapterModule::ShutdownModule()
{
#if WITH_GAMEPLAY_DEBUGGER
if (IGameplayDebugger::IsAvailable())
{
IGameplayDebugger& GameplayDebuggerModule = IGameplayDebugger::Get();
GameplayDebuggerModule.UnregisterCategory("MLAdapter");
GameplayDebuggerModule.NotifyCategoriesChanged();
}
#endif
}