During development, console commands can be very helpful by allowing a developer or tester to easily bypass content, or disable the mechanics not relevant to the current test being run. The most common way to implement this is via console commands, which can invoke functions during runtime. The console can be accessed using the tilde key (~
) or the equivalent in the upper-left area of the alphanumeric zone of your keyboard.
If you haven't already followed the Creating a new editor module recipe, do so, as this recipe will need a place to initialize and register the console command.
Open your editor module's header file, and add the following code:
IConsoleCommand* DisplayTestCommand; IConsoleCommand* DisplayUserSpecifiedWindow;
Add the following within the implementation of
StartupModule
:DisplayTestCommand = IConsoleManager::Get().RegisterConsoleCommand(TEXT("DisplayTestCommandWindow"), TEXT("test"), FConsoleCommandDelegate::CreateRaw...