diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index b8824259609..87edc7de0ac 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -856,8 +856,8 @@ Notification received when a node is unparented (parent removed it from the list of children). - - Notification received when the node is instantiated. + + Notification received by scene owner when its scene is instantiated. Notification received when a drag operation begins. All nodes receive this notification, not only the dragged one. diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml index 754d3ac73da..97595a69840 100644 --- a/doc/classes/PackedScene.xml +++ b/doc/classes/PackedScene.xml @@ -92,7 +92,7 @@ - Instantiates the scene's node hierarchy. Triggers child scene instantiation(s). Triggers a [constant Node.NOTIFICATION_INSTANCED] notification on the root node. + Instantiates the scene's node hierarchy. Triggers child scene instantiation(s). Triggers a [constant Node.NOTIFICATION_SCENE_INSTANTIATED] notification on the root node. diff --git a/scene/main/node.cpp b/scene/main/node.cpp index cc3d14e5be1..4b28e4076f6 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -2926,7 +2926,7 @@ void Node::_bind_methods() { BIND_CONSTANT(NOTIFICATION_PROCESS); BIND_CONSTANT(NOTIFICATION_PARENTED); BIND_CONSTANT(NOTIFICATION_UNPARENTED); - BIND_CONSTANT(NOTIFICATION_INSTANCED); + BIND_CONSTANT(NOTIFICATION_SCENE_INSTANTIATED); BIND_CONSTANT(NOTIFICATION_DRAG_BEGIN); BIND_CONSTANT(NOTIFICATION_DRAG_END); BIND_CONSTANT(NOTIFICATION_PATH_RENAMED); diff --git a/scene/main/node.h b/scene/main/node.h index 703c580d3fe..ae6a9975795 100644 --- a/scene/main/node.h +++ b/scene/main/node.h @@ -259,7 +259,7 @@ public: NOTIFICATION_PROCESS = 17, NOTIFICATION_PARENTED = 18, NOTIFICATION_UNPARENTED = 19, - NOTIFICATION_INSTANCED = 20, + NOTIFICATION_SCENE_INSTANTIATED = 20, NOTIFICATION_DRAG_BEGIN = 21, NOTIFICATION_DRAG_END = 22, NOTIFICATION_PATH_RENAMED = 23, diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index 33334801c3f..e0bedad5952 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -1755,7 +1755,7 @@ Node *PackedScene::instantiate(GenEditState p_edit_state) const { s->set_scene_file_path(get_path()); } - s->notification(Node::NOTIFICATION_INSTANCED); + s->notification(Node::NOTIFICATION_SCENE_INSTANTIATED); return s; }