Search Issue Tracker
Won't Fix
Votes
6
Found in
2020.3.42f1
2021.3.15f1
2022.1.23f1
2022.2.0f1
2023.1.0a23
2023.2.0a1
Issue ID
UUM-21078
Regression
No
"DirectoryNotFoundException: Could not find a part of the path" thrown when creating a new C# Script in a path longer than 260 characters
How to reproduce:
- Create a new Unity project
- Create a path longer than 260 characters in the Assets folder
- Create a new C# Script in that folder
Expected results: The C# Script is created
Actual results: "DirectoryNotFoundException: Could not find a part of the path" thrown in the Console window
Reproducible with: 2020.3.42f1, 2021.3.15f1, 2022.1.23f1, 2022.2.0f1, 2023.1.0a23
Reproducible on: Windows 10
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
- URP Realtime reflection probes do not update when RenderProbe() is being called once per second
- Addressable terrain shader variants are stripped from the Player
- [iOS] Debug.Log() appears as <private> in Console app
- UI stays in the background when it is disabled in simulator
- A wrong log file is attached when project is launched with a "-logFile" command line argument
Resolution Note:
Unfortunately, we won't be able to fix this issue: Even if we manage to find all potentially problematic usage of CreateFile APIs in our own codebase, Unity Editor actually communicates with many tools we don't have control of (e.g. platform-specific compilers etc.). So we will never be able to fully support long paths on Windows.