A simple question
i call “t.MaxFPS 60” from console and it sets max fps to 60. So i assumed i would call an exec function with one param which is FString from console like this “SomeCommand SomeString”, but it didn’t worked.
Here it is
// Class is derived from AActor
// Header
UFUNCTION(Exec, Category = IPC)
void SendCommandToCE(const FString Command);
// Source
void ACECommunication::SendCommandToCE(const FString Command)
{
if (CEProcess)
{
CEProcess->WriteWhenReady(Command);
}
}
Then i tried calling it from console like this “SendCommandToCE something” and it gives me “Command not recognized : SendCommandToCE uci”
I tried putting it between quotes since it is a string but the same. How can i call this?
I know that Execs can be placed in specific places. I know it will work when You add them to PlayerController or to the GameInstance (and maybe GameEngine).
Aside of Exec, there Command Delegates, but not sure how to use them, check commands in editor and search command in github to get examples. Here few examples that i found:
Just remember too add Super::Exec at the end of it or else you will kill off lot of commands. Also this method won’t work with auto complete, you will need to add stuff in Input.ini
There says: By registering console commands and variables in the console manager you get auto completion and enumeration to get a list of all console objects (console command Help or DumpConsoleVariables). Because of this, you should avoid the old Exec interface
Sigh… It should say the same inside UFUNCTION() page. But it doesnt. Sometimes how slow UE Doc is updated kills me.