Search Issue Tracker
Fixed in 2021.2.X
Fixed in 2020.2.X, 2021.1.X
Votes
0
Found in
2021.1.0a5
2021.1.0a9
2021.2
Issue ID
1298258
Regression
Yes
Scripts are not always immediately recompiled when clicking away during the script naming step
How to reproduce:
1. Create a new Unity project
2. Create a new C# script, but don't finish naming it
3. Instead of renaming it or pressing Enter, click on the icon of the script or click on an empty space in the Project window
Expected result: the scripts are recompiled immediately(as seen at the bottom right of the Editor)
Actual result: scripts are not recompiled immediately
Reproducible with: 2021.1.0a5 2021.1.0b1, 2021.2.0a1
Not reproducible with: 2018.4.30f1, 2019.4.16f1, 2020.1.17f1, 2020.2.1f1, 2021.1.0a4
Notes:
Only reproducible on Windows
If the issue does not occur at first, delete the script/asmdef and try again from step 2
Because of delayed compilation, creating new Assets can result in a NullReferenceException from UnityEditor.PropertyEditor.DrawEditors(to reproduce, create Assembly Definitions instead of C# scripts in steps 2-3, delete them after each attempt)
Exception:
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.PropertyEditor.DrawEditors (UnityEditor.Editor[] editors) (at <20090764902e4293871cd9b1a16b42f1>:0)
UnityEditor.PropertyEditor.RebuildContentsContainers () (at <20090764902e4293871cd9b1a16b42f1>:0)
UnityEditor.InspectorWindow.OnSelectionChanged () (at <20090764902e4293871cd9b1a16b42f1>:0)
UnityEditor.Selection.Internal_CallSelectionChanged () (at <20090764902e4293871cd9b1a16b42f1>:0)
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
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
Resolution Note (fix version 2021.2):
Fixed in 2021.2.0a4
Resolution Note (fix version 2021.1):
Fixed in 2021.1.0b5