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
- Crash on CollectAllSceneManagerAndObjectIDs when opening a specific Scene
- GPU device suspended error when replaying a video in the Video Player with NVIDIA Vertical Sync set to Fast
- GPU device suspended error when replaying a video in the Video Player with NVIDIA Vertical Sync set to Fast
- SetComponentEnabled uses class instead of struct when constraining Enableable Component type
- [iOS] Application.deepLinkActivated does not get invoked while app is running when UIApplicationSceneManifest is added in Info.plist
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