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
- Volumetric fog shader variants are missing from build when "Strict Shader Variant Matching" is disabled
- Unnecessary modifications clutter the Scene when using a RectTransform driven by a LayoutGroup in a Prefab
- Files in the target folder are deleted without a proper warning when building an iOS project
- Character animation freezes when toggling animator on/off in a coroutine
- Certain textures are incorrectly marked in the render pass list when observed through Render Graph Viewer
This is a duplicate of issue #1355141