Custom console function

Hi mdonge,

Looking at the documentation on the Console Manager makes it look like the Exec-style of console commands may be deprecated. That said, it also lead me to an answer: If you want arguments, you can use a function like this:

UFUNCTION(Exec, Category = "Console Command")
void Kick(const TArray<FString>& Players);

Then you can either enforce that only one player is given (e.g. not kick anyone and report an error if multiple players are specified) or iterate over the list kicking each player in turn.

For reference, you might also look at the information for IConsoleManager::RegisterConsoleCommand and/or FAutoConsoleCommands, since those appear to be the preferred way of setting up console commands. I wasn’t able to find quite all the documentation I’d like for them (esp. on the FConsoleCommandDelegate and related structures), but a quick “Go to definition” in Visual Studio let me infer what I needed.

Please let me know if this helps!