Command Line arguments in Unity
May 19, 2021
This is more of an aide-mémoire than a new story but today was the day that I started using command line arguments to launch my Unity app.
Built-in arguments
To be honest I do not know what built-in command line arguments exist when you create a Unity App. My Google-Fu has failed me. The only one I know is -logfile:
myApp.exe -logfile mylogfile.txt
This will reroute the standard location of the log file to the same folder as your exe. That is pretty handy especially if you give your exe out to others for testing.
Custom arguments
Since Unity is using a ‘dash flag value’ style of command line it is probably a good idea to continue with this pattern.