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
- Packman: "My Assets" filters section doesn't rescale on filter sections collapse
- "DrawDepthNormalPrepass" exceptions are thrown in Editor when Ctrl key is held with specific renderer settings
- Script file name changes do not display in Editor when Compiler errors are present
- Sprites are not rotating with bones when the Sprite type is Unlit
- Crash on TransferField_NonArray<YAMLRead,Converter_String> when opening a specific project
Resolution Note (fix version 2021.2):
Fixed in 2021.2.0a4
Resolution Note (fix version 2021.1):
Fixed in 2021.1.0b5