MCPcopy Create free account
hub / github.com/NotYetGames/DlgSystem / RegisterConsoleCommands

Method RegisterConsoleCommands

Source/DlgSystem/Private/DlgSystemModule.cpp:155–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153}
154
155void FDlgSystemModule::RegisterConsoleCommands(const TWeakObjectPtr<const UObject>& InWorldContextObjectPtr)
156{
157 // Unregister first to prevent double register of commands
158 UnregisterConsoleCommands();
159
160 if (InWorldContextObjectPtr.IsValid())
161 {
162 WorldContextObjectPtr = InWorldContextObjectPtr;
163 }
164
165 IConsoleManager& ConsoleManager = IConsoleManager::Get();
166 ConsoleCommands.Add(
167 ConsoleManager.RegisterConsoleCommand(
168 TEXT("Dlg.DataDisplay"),
169 TEXT("Displays the Dialogue Data Window"),
170 FConsoleCommandDelegate::CreateRaw(this, &Self::DisplayDialogueDataWindow),
171 ECVF_Default
172 )
173 );
174
175 ConsoleCommands.Add(
176 ConsoleManager.RegisterConsoleCommand(
177 TEXT("Dlg.LoadAllDialogues"),
178 TEXT("Load All Dialogues into memory"),
179 FConsoleCommandDelegate::CreateLambda([]()
180 {
181 UDlgManager::LoadAllDialoguesIntoMemory();
182 }),
183 ECVF_Default
184 )
185 );
186
187 // In case the DlgDataDisplay is already opened, simply refresh the actor reference
188 RefreshDisplayDialogueDataWindow(false);
189}
190
191void FDlgSystemModule::UnregisterConsoleCommands()
192{

Callers 1

Calls 1

IsValidMethod · 0.45

Tested by

no test coverage detected