Search Issue Tracker
Duplicate
Votes
3
Found in
2019.2
2019.3
2019.3.0f6
2020.1
Issue ID
1215840
Regression
No
Editor freezes on script recompilation when a custom window is open and it has a reference to a Serializable VisualElement class
How to reproduce:
1. Open the attached 'project-1215840.zip' project
2. In the Editor select 'Bug' > 'Bug_Test'
3. Make a change in 'Bug_Test.cs' script and click on the Editor to recompile scripts
4. Try clicking anywhere in the Editor or resize the 'NewUI' window (only the top tool-bar is responsive)
Expected result: Editor does not freeze
Actual result: Editor freezes indefinitely
Reproducible with: 2019.2.21f1, 2019.3.1f1, 2019.4.9f, 2020.1.0a23, 2020.2.0b1
Could not test with: 2017.4.37f1, 2018.4.17f1 (UI Elements not available)
Note: the custom window includes a property that derives from VisualElement. During assembly reload that property is serialized, even though it is private. This puts the window into a bad state freezing the editor. Putting the [System.NonSerialized] attribute on the property avoids the freeze by making sure it is never serialized during assembly reload.
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
- [Mobile] Developer Console does not appear when an error is thrown
- [HDRP] Game view renders artifacts when Camera's Component "Post Anti-aliasing" is set to "TAA" and Dynamic Resolution's "Forced Screen Percentage" is changed
- A deactivated Prefab's name color becomes white when a GameObject in the scene is deactivated
- The Game view becomes blank when using Frame Debugger with MSAA and Texture binding enabled in Play Mode
- NullReferenceException is thrown when changing the Inspector preview selection
This is a duplicate of issue #1355141