I tried implementing a console command in my AI controller like this:
// .h
UFUNCTION(Exec, Category = “Console Command”)
void ToggleAIDebug();
// .cpp
void ToggleAIDebug()
{
UE_LOG(LogTemp, Warning, TEXT(“Hit debug”));
DrawDebug = !DrawDebug;
}
ToggleAIDebug shows up in the console command window in-game, but the function isn’t getting called. I read somewhere that said certain classes couldn’t run console commands, is that the case for AIControllers or am I doing something wrong?