Search Issue Tracker
Fixed
Fixed in 2020.3.48f1, 2021.3.23f1, 2022.2.16f1, 2023.1.0b13, 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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Resolution Note (fix version 2023.2.0a9):
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.