Skip to content

Behavior change with handling _notification in class hierarchy #1498

@Naros

Description

@Naros

Godot version

4.3-beta1

godot-cpp version

4.3 - sha 45be6d0

System information

Windows 11

Issue description

In Godot 4.2, with a GDExtension class hierarchy of Node3D > CustomNode3D > SuperCustomNode3D, if both of the custom classes implemented in GDExtension had a _notification method, the SuperCustomNode3D had to call the CustomNode3D implementation as it would not be dispatched by Godot automatically.

In Godot 4.3, this behavior has been fixed and now works as it should, where Godot handles the dispatch of the _notification functions regardless of how the hierarchy is constructed.

This should at the very least be documented in a migration guide as a behavior change.

Steps to reproduce

  1. Create a CustomNode3D that extends Node3D, implementing _notification.
  2. Create a SuperCustomNode3D that extends CustomNode3D, implementing _notification.

In Godot 4.2, the _notification in CustomNode3D was never called.
In Godot 4.3, both _notification functions are called.

Minimal reproduction project

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions