Search Issue Tracker
Third Party Issue
Votes
0
Found in
6000.0.58f1
6000.1.16f1
6000.2.6f1
6000.3.0b3
Issue ID
UUM-119450
Regression
Yes
Unity auto-generates code it can't compile when classes are renamed
Reproduction steps:
1. Open the attached “IN-116095_Repro.zip“ archived project
2. Open and change the “ReproScript.cs“ Script’s class name “ReproScipt“ to “ReproScripts“ in the 3rd line
3. Return to the Editor and wait for the recompiling to end
4. Observe the Project’s assets and the Console
Expected result: No new folders are present, no errors in the console
Actual result: “bin“ and “obj“ folders appear, a lot of “… Feature 'global using directive' is not available in C# 9.0. Please use language version 10.0 or greater.“ errors appear
Reproducible with: 6000.0.19f1, 6000.0.58f1, 6000.1.16f1, 6000.2.6f1, 6000.3.0b3
Not reproducible with: 6000.0.18f1
Reproducible on: M1 Max MacOS 15.5 (Tested by CQA)
Not reproducible on: No other environment tested
Note: If the issue doesn’t reproduce from the first try, rename the class back to “ReproScript“ and repeat steps 2-4 and so on.
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
- StackOverflowException occurs and tests fail to load when the Test Runner window is opened while System.Windows.Forms.dll and System.Deployment.dll are present in the project
- Some UXML Template Asset foldouts appear enabled when all fields inside are disabled
- URP Terrain Demo crash on burst_signal_handler after Generating lighting
- Project window button icons are poorly visible and their shades differ in Light theme
- Automatic LOD fails and SRP Batcher incompatibility occurs when using spline-based quad-topology meshes
Resolution Note:
Hi, this appears to be a vscode bug: https://github.com/dotnet/vscode-csharp/issues/8304 - we suggest that you try toggling the dotnet.projects.enableFileBasedPrograms setting to work around this.