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
- Select Preset "None" icon changes after switching tabs
- [Android] Crash when using xxHash3 and targeting the ARMv7 Architecture with IL2CPP Scripting Backend
- GameObject reference in a Script Component becomes missing when unpacking a variant of another Prefab variant
- Project Settings vertical separator position is not synchronized with the mouse position when dragging it horizontally
- Crash on PhysicsDebugDraw::SelectFiltering::Update when entering play mode with Physics Debug window docked and unfocused
Resolution Note (fix version 2021.2):
Fixed in 2021.2.0a4
Resolution Note (fix version 2021.1):
Fixed in 2021.1.0b5