Skip to content

Instantly share code, notes, and snippets.

@rondreas
Created April 17, 2023 13:56
Show Gist options
  • Save rondreas/308200c5e50676343bcb8db7e1e07541 to your computer and use it in GitHub Desktop.
Save rondreas/308200c5e50676343bcb8db7e1e07541 to your computer and use it in GitHub Desktop.
Minimal example of what is required to make a console command
#include "HAL/IConsoleManager.h"
#if !UE_BUILD_SHIPPING
static FAutoConsoleCommand HelloWorld(
TEXT("hello.world"),
TEXT("Print Hello, World! to the console log"),
FConsoleCommandDelegate::CreateLambda([](){
GLog->Log(TEXT("Hello, World!"));
})
);
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment