I want to add a custom command arg, like -server, to perform some of my own functions, but I don’t know where to handle it.
I need to bulk import resources from the outside into the engine. At first I wanted to add a Program, but read the relevant code and found that calling the relevant import function requires the use of engine functions. So be prepared to add a command similar to -server to execute my function.
Note that -server is already used by the engine to turn on dedicates server:
If thats your intention then keep in mind that dedicated server can be potentially turn on without need tof that option so insted you should use this insted:
()->GetNetMode() == NM_DedicatedServer
or this:
IsRunningDedicatedServer()
Here list of them so you can check if you don’t name collide with anything else:
Thanks for your answer, I saw this document, but I need a CMD program like -server, or a tool like SlateViewer. But it seems that Programs cannot use the features of the engine.