Space Plunder
Loading...
Searching...
No Matches
FBaseHelpersEditorModule Class Reference

#include <BaseHelpersEditor.h>

Inheritance diagram for FBaseHelpersEditorModule:

Public Member Functions

virtual void StartupModule () override
 
virtual void ShutdownModule () override
 
void EditorIsFullyLoaded () const
 

Public Attributes

FDelegateHandle MyHandle
 

Static Private Member Functions

static void ToggleViewportStats ()
 

Member Function Documentation

◆ EditorIsFullyLoaded()

void FBaseHelpersEditorModule::EditorIsFullyLoaded ( ) const
50{
51 if(GEngine && GUnrealEd)
52 {
53 FCoreDelegates::OnEndFrame.Remove(MyHandle);
55 }
56 else
57 {
58 UE_LOG(LogTemp, Warning, TEXT("FBaseHelpersEditorModule: GEngine or GUnrealEd is still do not exist for whatever reason..."));
59 }
60}
FDelegateHandle MyHandle
Definition BaseHelpersEditor.h:20
static void ToggleViewportStats()
Definition BaseHelpersEditor.cpp:62

◆ ShutdownModule()

void FBaseHelpersEditorModule::ShutdownModule ( )
overridevirtual
35{
36#if WITH_GAMEPLAY_DEBUGGER
37 if (IGameplayDebugger::IsAvailable())
38 {
39 IGameplayDebugger& GameplayDebuggerModule = IGameplayDebugger::Get();
40 GameplayDebuggerModule.UnregisterCategory("Selector");
41 // GameplayDebuggerModule.UnregisterExtension("Server");
42 GameplayDebuggerModule.UnregisterExtension("Selector");
43 GameplayDebuggerModule.NotifyCategoriesChanged();
44 }
45#endif // WITH_GAMEPLAY_DEBUGGER
46
47}

◆ StartupModule()

void FBaseHelpersEditorModule::StartupModule ( )
overridevirtual
23{
24#if WITH_GAMEPLAY_DEBUGGER
25 IGameplayDebugger& GameplayDebuggerModule = IGameplayDebugger::Get();
26 GameplayDebuggerModule.RegisterCategory("Selector", IGameplayDebugger::FOnGetCategory::CreateStatic(&FGameplayDebuggerCategory_Selector::MakeInstance), EGameplayDebuggerCategoryState::EnabledInGameAndSimulate, 3);
27 // GameplayDebuggerModule.RegisterExtension("Server", IGameplayDebugger::FOnGetExtension::CreateStatic(&FGameplayDebuggerExtension_Server::MakeInstance));
28 GameplayDebuggerModule.RegisterExtension("Selector", IGameplayDebugger::FOnGetExtension::CreateStatic(&FGameplayDebuggerExtension_Selector::MakeInstance));
29 GameplayDebuggerModule.NotifyCategoriesChanged();
30#endif
31 MyHandle = FCoreDelegates::OnEndFrame.AddRaw(this, &FBaseHelpersEditorModule::EditorIsFullyLoaded);
32}
void EditorIsFullyLoaded() const
Definition BaseHelpersEditor.cpp:49

◆ ToggleViewportStats()

void FBaseHelpersEditorModule::ToggleViewportStats ( )
staticprivate
63{
64#if WITH_EDITOR
65 for(const FString& Stat : GetDefault<UBaseHelpersEditorDeveloperSettings>()->StartupStatCommands)
66 {
67 if(Stat.IsEmpty()){continue;}
68 GEngine->ExecEngineStat(GUnrealEd->GetWorld(), GUnrealEd->GetWorld()->GetGameViewport(), *Stat);
69 }
70 // const FString FPS = "FPS";
71 // GEngine->ExecEngineStat(GUnrealEd->GetWorld(), GUnrealEd->GetWorld()->GetGameViewport(), *FPS);
72#endif
73}
Definition BaseHelpersEditorDeveloperSettings.h:14

Member Data Documentation

◆ MyHandle

FDelegateHandle FBaseHelpersEditorModule::MyHandle

The documentation for this class was generated from the following files: