godotengine / godotengine/godot-docs

PropagateNotification() And Engine Level Callbacks.

Open
#6,788 0 comments 0 reactions 0 assignees View on GitHub
area:class reference enhancement
Dominant language
reStructuredText
Stars
5.7k
Forks
3.8k
Avg merge
1d 20h
Merged PRs (30d)
25

Description

**Your Godot version:**
Godot Engine v3.5.1.stable.mono.official.6fed1ffa3

**Issue description:**
Code summary documentation for,
```C#
[GodotMethod("propagate_notification")]
PropagateNotification(int what)
```
states,
```C#
///
/// Notifies the current node and all its children recursively by calling on all of them.
///
```
The issue appears, that both the internal documentation and the documentation online, state that the calling node, notifies itself, and all its children recursively by calling Notification(bool). However, the observed functionality, appears to call Notification on all nodes, include parent nodes. Assuming this is expected behavior of allowing "Objects to respond to a variety of engine-level callbacks" (see, [docs](https://docs.godotengine.org/en/stable/tutorials/best_practices/godot_notifications.html)), **then consider adding a note which stipulates that some engine-level callbacks are observed by all instantiated Nodes.**

Replicate,
Create two Nodes, one a parent of the other.
Attach a script to the child node and call PropagateNotification, which propagates the notification, `MainLoop.NotificationWmQuitRequest`.
Attach a script to the parent node and using _Notification(int what) observe that it has received the notification.

Based on the current IMMEDIATE documentation, this is unexpected.

Consider adding a note about engine level callbacks, if this is the observed behavior -- otherwise, revision may be necessary.

**URL to the documentation page (if already existing):**
https://docs.godotengine.org/en/stable/classes/class_node.html?highlight=Node#class-node-method-propagate-notification

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.