Search Issue Tracker
Fixed in 2020.3.48f1
Fixed in 2020.3.X, 2021.3.X, 2022.2.X, 2023.1.X, 2023.2.X, 2023.2.0a9
Votes
0
Found in
2020.3.42f1
2021.3.15f1
2022.2.0f1
2023.1.0a22
2023.2.0a1
Issue ID
UUM-21600
Regression
No
Commandline receives different commands when passing through System.Environment.Commandline method
How to reproduce:
1. Open the attached “repro-project.zip”
2. Click “Tools → Automated Command Line Tests”
3. Wait for the process to finish and observe the console
Expected results: The output should be the same as the input.
Actual result: The output differs from the input, replacing come characters and adding quotes.
Reproducible with: 2020.3.42f1, 2021.3.15f1, 2022.2.0f1, 2023.1.0a22
Reproducible on: Windows 10
Example output:
Input: -developer -screen-width 1920 -screen-height 1080 -force-d3d11 -annoy-me -developer --twset "DevEnvironments.InitialEnvironment"=04 --twset "Quality Settings.SRP Batcher"=off -force-gfx-direct -force-d3d12-debug
Output: -developer -screen-width 1920 -screen-height 1080 -force-d3d11 -annoy-me -developer --twset "DevEnvironments.InitialEnvironment\"=04 --twset \"Quality Settings.SRP Batcher\"=off -force-gfx-direct -force-d3d12-debu"
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “Screen position out of view frustum...” errors are thrown when zooming out in the Scene view after creating UI GameObject
- CurveTexture is not being released when unloading AssetBundle containing a Scene with ColorCurves post-processing component in Global Volume
- Crash on ExtractActiveCasterInfo when navigating the scene view in a project with specific lighting data
- Build Profile name increments when numeric suffix is removed from duplicate Profile name
- "Unrecognized block header in profiler data file, stopping deserialization" error is shown and no more profiler data is recorded when the Player is connected and profiler recording is enabled/disabled few times
Resolution Note (fix version 2023.2):
Arguments are now correctly split when quoting sequence starts mid-way. Furthermore, support for escaped double quotes is added.
It is worth noting that passed arguments will only sometimes match the exact format from System.Environment.CommandLine. This is because arguments containing spaces will always be quoted, quotes from quoted sequences will be removed, escaped characters will become not escaped, etc.