Search Issue Tracker
By Design
Votes
0
Found in
2019.2.0a1
2019.2.0b1
2019.3.0a1
Issue ID
1154709
Regression
No
Window instance is broken when reloading after making changes in script to an active window
How to reproduce:
1. Open attached project "DialogBoxResearch.zip"
2. Click Dialogs > NewDialogBox
3. In "Dialogs" script, remove line #156
4. Save the script
5. Open the Editor
6. Observe the NewDialogBox Window that was opened
Expected result: It does not change
Actual result: It loses its text
Reproducible with - 2019.2.0b3, 2019.3.0a3
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note:
This is because the code that runs inside ShowInternal() needs to run after a domain reload (no need to change the scripts to get this, just enter play mode).
If you want to inject parameters into the window like the messages etc. then they need to be saved onto the window instance for serialization.
Then inside OnEnable() you can access this data again to setup the UI. Not this issue is not specific to UIElements, it's a consequence of how windows and various objects behave in Unity.