unitysetup.powershell
unitysetup.powershell copied to clipboard
Specifying -LogFile for output to the console
Currently this script assumes that a path is required for the -logFile parameter. We can update it to support getting console output.
https://docs.unity3d.com/Manual/CommandLineArguments.html:
Specify where Unity writes the Editor or Windows/Linux/OSX standalone log file. To output to the console, specify - for the path name. On Windows, specify - option to ensure output goes to stdout, which is not the console by default.
Does this work correctly with batch mode?
Note that in batch mode, Unity sends a minimal version of its log output to the console. However, the Log Files still contain the full log information.
Batch mode is typically used for any automated building, and so far, yes in my versions it works correctly. You still have full control over how logs are displayed and their logging types can be modified by utilizing scripts that can change it if specific conditions using LogErrorFormat. The only thing batch mode really changes is how dialogs are handled.