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
- [Asset Bundles] A new bundle hash is not generated when the name of a serialized field is changed
- Icon section shows incomplete message and unusable check box in Build Profiles and Player Settings window instead of “Not applicable for this platform” for Dedicated Server Platform
- Assets are created in the Package folders when creating assets via custom buttons in the Inspector window or other windows
- “Select” windows are named differently on Windows and macOS
- [Windows] No minimum “Select” window size
Resolution Note (fix version 2021.2):
Fixed in 2021.2.0a4
Resolution Note (fix version 2021.1):
Fixed in 2021.1.0b5