Search Issue Tracker
By Design
Votes
0
Found in
2021.3.39f1
2022.3.32f1
6000.0.5f1
Issue ID
UUM-73156
Regression
No
A custom Editor window SerializedField's values returned as null until the custom window is reopened
How to reproduce:
1. Create a new project and add the attached “DialogueEditorBugReport” and “DialogueWindowBugReportTestUXML” Assets to it
2. Click Window → “New Dialogue Editor Bug Report”
3. Open the “DialogueEditorBugReport” in the Inspector and assign “DialogueWindowBugReportTestUXML” to the “Condition List Entry Template”
4. Observe the Console
5. Close the “New Dialogue Editor Bug Report” and reopen it
6. Observe the Console
Expected results: Both times “Condition template is null: False” is logged into the Console
Actual results: “Condition template is null: True” is logged after assigning the Asset and “Condition template is null: False” is logged after reopening the window
Reproducible with: 2021.3.39f1, 2022.3.32f1, 6000.0.5f1
Reproducible on: Windows 11 Pro
Not reproducible on: No other environment tested
Note:
-Unless the window is reopened, reopening the project or changing the Script to trigger the recompilation doesn’t solve the issue
-After the window is reopened the values are returned correctly even after restarting the project
-To trigger the bug again, change the “Condition List Entry Template” to None and assign the “DialogueWindowBugReportTestUXML” again
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
- Intercepted Events text is hardly visible in Inspector window for UI elements when Editor theme is set to Light
- [Hierarchy V2] Add new Query Block window contains a typo in the Hierarchy Search Area block
- Scene is not rendered in Player when ran with -force-d3d12 argument and GPU Resident Drawer enabled
- “Failed to load” window appears when a package’s docked window is opened and the package is uninstalled
- Properties window is not closed when the GameObject is deleted and the Properties window is not focused
Resolution Note:
This behaviour is actually by design. The custom values, or what we call default references, are intended to apply different default values when an object is created—in this case, when a new window instance is opened. After this point, we serialize the values of the window to preserve the current state. Reapplying the default values after creation would overwrite any changes made, so the defaults are only applied upon initial creation.
Thanks again for the bug report.
Kind regards,
Karl Jones