Hello
Is there any way to change the name of an exec function?
I want to make a “/kill” command what can be called from console, but “Kill” function name is already taken and used at several places. Would not want to change that just for a name.
So I made a function:
UFUNCTION( Exec, Category = CommandLine )
void CommandKill();
I would like still it to be called by typing “/kill”. DisplayName and meta=(ScriptName=“kill”) did not do anything
Only certain classes can support console commands, most notably:
Pawns
Player Controllers
Cheat Managers
GameModes
PlayerInput
HUD
If you declared the function in any of the above class (and you have a valid class active), you can call it using the following syntax from the console window: