Reproduction steps:
1. Create and open a new project
2. Right click on the Console Window
3. Select "Open Editor Log" and observe it works as expected
4. Close the Unity project
5. Open a terminal (e.g. Powershell)
6. Make sure the current working directory in the terminal is anywhere outside of the Unity project root
7. Launch the project from the terminal, using a relative log file redirection (e.g. C:\Unity\6000.0.32f1\Editor\Unity.exe -projectpath D:\Projects\RepoProject -logfile .\Logs\EditorLog.txt)
8. Observe the log file is created relative to the current working directory in the terminal
9. Create a blank “EditorLog.txt” file at the equivalent path, but relative to the project (e.g. D:\Projects\RepoProject\Logs\EditorLog.txt)
10. Right click on the Unity Console Window
11. Select "Open Editor Log"
12. Observe the opened .txt file
Expected result: The correct “EditorLog.txt” file with logs is opened
Actual result: The blank “EditorLog.txt” file relative to the project root is opened
Reproducible with: 2022.3.57f1, 6000.0.36f1, 6000.1.0b5, 6000.2.0a2
Reproducible on: Window 10 (User reported), Windows 11
Not reproducible on: no other environment tested
Note:
- Nothing will open by clicking "Open Editor Log" (after 7th step) if the blank “EditorLog.txt” (in the 9th step) is not created relative to the project