You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
[SmartObject] Added GameplayDebuggerCategory_SmartObject
First pass includes stats for registered objects (collection entries, runtime active objects, loaded components) and visuals for slots #rb mieszko.zielinski, mikko.mononen #preflight 61827c8b2b589a00015ae20f #ROBOMERGE-AUTHOR: yoan.stamant #ROBOMERGE-COMMAND: FnMain #ROBOMERGE-SOURCE: CL 18033215 in //UE5/Main/... #ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v885-17909292) #ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0 #ROBOMERGE[bot1]: Main [CL 18033255 by yoan stamant in ue5-release-engine-test branch]
This commit is contained in:
@@ -1,13 +1,18 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
#include "SmartObjectsModule.h"
|
||||
|
||||
#include "Modules/ModuleManager.h"
|
||||
|
||||
#if WITH_GAMEPLAY_DEBUGGER
|
||||
#include "GameplayDebugger.h"
|
||||
#include "GameplayDebuggerCategory_SmartObject.h"
|
||||
#endif
|
||||
|
||||
#define LOCTEXT_NAMESPACE "SmartObjects"
|
||||
|
||||
class FSmartObjectsModule : public ISmartObjectsModule
|
||||
{
|
||||
// Begin IModuleInterface
|
||||
virtual void StartupModule() override;
|
||||
virtual void ShutdownModule() override;
|
||||
};
|
||||
@@ -16,17 +21,25 @@ IMPLEMENT_MODULE(FSmartObjectsModule, SmartObjectsModule)
|
||||
|
||||
void FSmartObjectsModule::StartupModule()
|
||||
{
|
||||
// Called right after the module DLL has been loaded and the module object has been created
|
||||
// Load dependent modules here, and they will be guaranteed to be available during ShutdownModule. ie:
|
||||
// FModuleManager::Get().LoadModuleChecked(TEXT("HTTP"));
|
||||
#if WITH_GAMEPLAY_DEBUGGER
|
||||
IGameplayDebugger& GameplayDebuggerModule = IGameplayDebugger::Get();
|
||||
GameplayDebuggerModule.RegisterCategory("SmartObject",
|
||||
IGameplayDebugger::FOnGetCategory::CreateStatic(&FGameplayDebuggerCategory_SmartObject::MakeInstance),
|
||||
EGameplayDebuggerCategoryState::EnabledInGameAndSimulate);
|
||||
GameplayDebuggerModule.NotifyCategoriesChanged();
|
||||
#endif
|
||||
}
|
||||
|
||||
void FSmartObjectsModule::ShutdownModule()
|
||||
{
|
||||
// Called before the module is unloaded, right before the module object is destroyed.
|
||||
// During normal shutdown, this is called in reverse order that modules finish StartupModule().
|
||||
// This means that, as long as a module references dependent modules in it's StartupModule(), it
|
||||
// can safely reference those dependencies in ShutdownModule() as well.
|
||||
#if WITH_GAMEPLAY_DEBUGGER
|
||||
if (IGameplayDebugger::IsAvailable())
|
||||
{
|
||||
IGameplayDebugger& GameplayDebuggerModule = IGameplayDebugger::Get();
|
||||
GameplayDebuggerModule.UnregisterCategory("SmartObject");
|
||||
GameplayDebuggerModule.NotifyCategoriesChanged();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#undef LOCTEXT_NAMESPACE
|
||||
|
||||
Reference in New Issue
Block a user