You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exported variables defined in some base class script are serialized in nodes using a script whose class inherits from the base class too.
However, such serialized fields are not updated in the inspector: when adding, removing or renaming exported vars on the base class script, nodes with child class script do not show any field changes in the inspector.
This only happens when the script is a child class, and the exported var is on the base class. If the script is the base class itself, or we change exported var on the child class, the inspector updates appropriately.
Workaround: restart the editor
Note: unlike #70217, this affects the whole fields, not just the tooltip
Steps to reproduce
Open repro project demo scene
Select "Node2D with Child Script" in the inspector
Open BaseClass.gd in code editor
Comment out base_field2 declaration, add base_field3 or rename any existing field
Check both nodes in the inspector
Expected: both reflect the field changes
Actual: only "Node2D with Base Script" updates properly. The one with child script shows the old fields.
You can continue changing ChildClass fields too, but those should work normally.
You can also restart the editor to confirm the changes.
A side effect for @export var node: NodeClass is that when NodeClass changes, the node reference popup does not update and still shows matching types for the old types. In the extreme case where the class was removed or didn't compile properly at first, no node can be selected (until restart).
Today, I tried to just close the scene containing the node and reopen it to avoid rebooting the whole Godot editor, but the node with child class script just stopped showing the base class properties altogether! So I had to reboot the editor anyway in the end.
It must be a related bug, will probably be fixed if we fix instant refresh of child class node inspector.
Godot version
v4.0.rc1.official [8843d9a]
System information
Linux Ubuntu 20.04 with Unity desktop
Issue description
Exported variables defined in some base class script are serialized in nodes using a script whose class inherits from the base class too.
However, such serialized fields are not updated in the inspector: when adding, removing or renaming exported vars on the base class script, nodes with child class script do not show any field changes in the inspector.
This only happens when the script is a child class, and the exported var is on the base class. If the script is the base class itself, or we change exported var on the child class, the inspector updates appropriately.
Workaround: restart the editor
Note: unlike #70217, this affects the whole fields, not just the tooltip
Steps to reproduce
Expected: both reflect the field changes
Actual: only "Node2D with Base Script" updates properly. The one with child script shows the old fields.
You can continue changing ChildClass fields too, but those should work normally.
You can also restart the editor to confirm the changes.
Minimal reproduction project
v4.0.rc1 - Base class exported vars do not update on child class node.zip
The text was updated successfully, but these errors were encountered: