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 UnityPlayer!profiling::ProfilerManager::DisposeProfilerRecorder+0xa when Player gets relaunched and exited after running for a long amount of time
- [Input system] When releasing one touch and pressing a second touch during a single frame, the second touch is not translated into UI event line OnPointerDown by the InputSystemUIInputModule
- URP Samples - multiple "Attempting to resolve render surface" and other errors appear when setting Quality pipeline asset
- OnDemandRendering.willCurrentFrameRender returns incorrect values in the Player when UnityEngine.Rendering.OnDemandRendering.renderFrameInterval is greater than 1
- Root motion is not reapplied when transitioning from an animation without root motion to an animation with root motion
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