I was tracking an issue related to missing commandline arguemnts in “uecommandline.txt” in UE 5.3, while they were present in UE4.27.
I found that in Unreal 4.27, the commandline for “uecommandline.txt” included both commandline context from `Params.StageCommandline` and `Params.RunCommandline`. (UE4.27 source code) (CopyBuildToStagingDirectory.Automation.cs, line 3861)
However, `Params.RunCommandline` is not parsed in UE5. (UE5.3 source code) (CopyBuildToStagingDirectory.Automation.cs, line 4664-4667)
I am wondering is there any reason why `Params.RunCommandline` is no longer parsed?
The original change was made here: “Pass RunCommandline during launch to improve iteration times on mobile by not needing to rebuild .apk every time, because they are not passed via staged build anymore.”
The key issue here is if we pass run command line arguments like that we would need to rebuild .apk, because uecommandline.txt is bundled with-in .apk, and it’s like 20-30+ seconds to rebuild it.
What are you trying to use this for? This change is by design as run arguments are not really part of a “packaged build”.
I’ve included the dev ([mention removed]) here that made the change in case they have any further context beyond the above they’ve provided.
Hi Julian, thanks for you reply! From the commit you linked, the help message of `RunCommandline` has change to “Additional command line arguments for the program, which will not be staged in UECommandLine.txt in most cases”.
Which cases are referred by “most cases” in this context? And what are the other exceptions? It looks to me that the current codebase fully removes the `RunCommandline` from “UECommandLine.txt”.
Because UECommandLine.txt is packaged inside a package build (e.g. inside .apk or .ipa) we only package StageCommandline because this should be sufficient to run the packaged build on it’s own.
For example imagine using RunCommandline for something customizing some cvars for testing, it would be suboptimal to repackage and reinstall .apk/.ipa every time we want to change the tested cvar.
Instead RunCommandline on Android is provided externally via
- adb shell am start … --e cmdline “…”
- storage location like /sdcard/Android/data/…/files/UnrealGame/…/UECommandLine.txt