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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
This is a duplicate of issue #1355141