Closed leissler closed 1 year ago
This is a UnityBug related to [SerializeReference] & UIElements
This video showcases the same bug happening in a default unity inspector
https://user-images.githubusercontent.com/530629/234556840-06da1b82-23d8-4afe-971b-5d9197041e13.mp4
Will update as soon as my bug report was confirmed and there is a public issuetracker link.
Update:
Unity marked my issue as a duplicate of the following, currently active ticket. You can check for updates here: https://issuetracker.unity3d.com/issues/public-reference-doesnt-visually-update-when-changing-a-public-reference-back-to-none-in-the-inspector
This issue has been reported by Unity to have been fixed.
Do I understand correctly that you will need Unity 2023.3.0+ to have this fix included? Don't they backport such things?
When having a node-field of a Unity-scene-reference type (e.g. a GameObject variable for referencing Prefabs) with either DisplayType.NodeView or DisplayType.BothViews in its GraphDisplay attribute, it is correctly possible to choose a value from Unity's selector box. However, when choosing the "None" value, the field in the node does not update to the correct value but instead stays at the last selected non-empty value. With DisplyType.BothViews enabled, the field with the open selector box has this faulty behavior, while the other corresponding field (inspector or nodeview) does update correctly.
The video shows that de-selecting the node and then selecting it correctly refreshes the value of the field.