The command line parameter “CmdLineParameters” makes it possible to send commands to the UE App upon app initialization. To understand how this feature works, first prepare a setup to follow along with this demo:
After completing these three steps, your control panel should now have the FeaturesTemplate App and a new config, shown here:
Image 1. STANDALONE APPS: FeaturesTemplate App and a new config
Now that you have your environment setup, its time to try the command line parameter. First click on ‘Edit’ on your config, and then click ‘Streaming’ from the top menu items. Then scroll down to the very bottom, and find the ‘CmdLineParameters To Pass to App’.
Image 2. STREAMING: CmdLine
After saving, run the FeaturesTemplate app. After the app loads run to the 11th bay (yes, we know it takes a long time to get there). You’ll notice the sphere is now green. This is because UE4 received your command on run time to change the sphere’s color to green.
Image 3. Launching the Features Template Application: Сolor to green
Image 4. CmdLine: -blue -pink -white
Image 5. Launching the Features Template Application: -blue -pink -white
Now let’s test sending multiple commands to UE. Go back to the command line, enter ‘-blue -red -green’, save the config, and run the game again.
Image 7. Launching the Features Template Application: -blue -red -green
More advanced features
1. It is also possible to append cmdLine Arguments with existing ones. This can be used for authentication / token purposes.
2. First, lets return to a simple example, with the Command ‘-green’. This will make the sphere green in your example.
3. Now, check the ‘should append overiding cmdLine Argument with existing (sp, we know) one?’
Should append parameters from url with existing one to override?
Image 8. CmdLine: -green
Now that you have checked ‘’should append overiding cmdLine Argument with existing one?’, you are able to add additional command lines to the URL, by adding ‘?exeLunchArgs=-[variable]’ to the end of the URL.
For example, say I wanted to add
-’blue’ to my URL.
I will first start with this URL:
And then I would add ‘?exeLunchArgs=-blue’ to the end of it. My URL now looks like this:
The system has now appended the additional command and has sent both the command added into the config and the command added into the URL to the UE game.
When you click on
Then the output would be something like thi
Need help? Contact Support
Seek advice. Connect with others. Share your experiences. Join our lively Community Forum today.