NOTIFICATION_ENTER_TREE:null = 10
Notification received when the node enters a
SceneTree. See
_enter_tree.
This notification is received
before the related
tree_entered signal.
NOTIFICATION_EXIT_TREE:null = 11
Notification received when the node is about to exit a
SceneTree. See
_exit_tree.
This notification is received
after the related
tree_exiting signal.
NOTIFICATION_MOVED_IN_PARENT:null = 12
NOTIFICATION_READY:null = 13
Notification received when the node is ready. See
_ready.
NOTIFICATION_PAUSED:null = 14
Notification received when the node is paused. See
process_mode.
NOTIFICATION_UNPAUSED:null = 15
Notification received when the node is unpaused. See
process_mode.
NOTIFICATION_PHYSICS_PROCESS:null = 16
Notification received from the tree every physics frame when
is_physics_processing returns
true. See
_physics_process.
NOTIFICATION_PROCESS:null = 17
Notification received from the tree every rendered frame when
is_processing returns
true. See
_process.
NOTIFICATION_PARENTED:null = 18
Notification received when the node is set as a child of another node (see
add_child and
add_sibling).
Note: This does
not mean that the node entered the
SceneTree.
NOTIFICATION_UNPARENTED:null = 19
Notification received when the parent node calls
remove_child on this node.
Note: This does
not mean that the node exited the
SceneTree.
NOTIFICATION_SCENE_INSTANTIATED:null = 20
Notification received
only by the newly instantiated scene root node, when [method PackedScene.instantiate] is completed.
NOTIFICATION_DRAG_BEGIN:null = 21
Notification received when a drag operation begins. All nodes receive this notification, not only the dragged one.
Can be triggered either by dragging a
Control that provides drag data (see [method Control._get_drag_data]) or using [method Control.force_drag].
Use [method Viewport.gui_get_drag_data] to get the dragged data.
NOTIFICATION_DRAG_END:null = 22
Notification received when a drag operation ends.
Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded.
NOTIFICATION_PATH_RENAMED:null = 23
Notification received when the node's
name or one of its ancestors'
name is changed. This notification is
not received when the node is removed from the
SceneTree.
NOTIFICATION_CHILD_ORDER_CHANGED:null = 24
Notification received when the list of children is changed. This happens when child nodes are added, moved or removed.
NOTIFICATION_INTERNAL_PROCESS:null = 25
Notification received from the tree every rendered frame when
is_processing_internal returns
true.
NOTIFICATION_INTERNAL_PHYSICS_PROCESS:null = 26
Notification received from the tree every physics frame when
is_physics_processing_internal returns
true.
NOTIFICATION_POST_ENTER_TREE:null = 27
Notification received when the node enters the tree, just before
NOTIFICATION_READY may be received. Unlike the latter, it is sent every time the node enters tree, not just once.
NOTIFICATION_DISABLED:null = 28
Notification received when the node is disabled. See
PROCESS_MODE_DISABLED.
NOTIFICATION_ENABLED:null = 29
Notification received when the node is enabled again after being disabled. See
PROCESS_MODE_DISABLED.
NOTIFICATION_RESET_PHYSICS_INTERPOLATION:null = 2001
Notification received when
reset_physics_interpolation is called on the node or its ancestors.
NOTIFICATION_EDITOR_PRE_SAVE:null = 9001
Notification received right before the scene with the node is saved in the editor. This notification is only sent in the Godot editor and will not occur in exported projects.
NOTIFICATION_EDITOR_POST_SAVE:null = 9002
Notification received right after the scene with the node is saved in the editor. This notification is only sent in the Godot editor and will not occur in exported projects.
NOTIFICATION_WM_MOUSE_ENTER:null = 1002
Notification received when the mouse enters the window.
Implemented for embedded windows and on desktop and web platforms.
NOTIFICATION_WM_MOUSE_EXIT:null = 1003
Notification received when the mouse leaves the window.
Implemented for embedded windows and on desktop and web platforms.
NOTIFICATION_WM_WINDOW_FOCUS_IN:null = 1004
Notification received from the OS when the node's
Window ancestor is focused. This may be a change of focus between two windows of the same engine instance, or from the OS desktop or a third-party application to a window of the game (in which case
NOTIFICATION_APPLICATION_FOCUS_IN is also received).
A
Window node receives this notification when it is focused.
NOTIFICATION_WM_WINDOW_FOCUS_OUT:null = 1005
Notification received from the OS when the node's
Window ancestor is defocused. This may be a change of focus between two windows of the same engine instance, or from a window of the game to the OS desktop or a third-party application (in which case
NOTIFICATION_APPLICATION_FOCUS_OUT is also received).
A
Window node receives this notification when it is defocused.
NOTIFICATION_WM_CLOSE_REQUEST:null = 1006
Notification received from the OS when a close request is sent (e.g. closing the window with a "Close" button or
kbdAlt + F4[/kbd]).
Implemented on desktop platforms.
NOTIFICATION_WM_GO_BACK_REQUEST:null = 1007
Notification received from the OS when a go back request is sent (e.g. pressing the "Back" button on Android).
Implemented only on Android.
NOTIFICATION_WM_SIZE_CHANGED:null = 1008
Notification received when the window is resized.
Note: Only the resized
Window node receives this notification, and it's not propagated to the child nodes.
NOTIFICATION_WM_DPI_CHANGE:null = 1009
Notification received from the OS when the screen's dots per inch (DPI) scale is changed. Only implemented on macOS.
NOTIFICATION_VP_MOUSE_ENTER:null = 1010
Notification received when the mouse cursor enters the
Viewport's visible area, that is not occluded behind other
Controls or
Windows, provided its [member Viewport.gui_disable_input] is
false and regardless if it's currently focused or not.
NOTIFICATION_VP_MOUSE_EXIT:null = 1011
Notification received when the mouse cursor leaves the
Viewport's visible area, that is not occluded behind other
Controls or
Windows, provided its [member Viewport.gui_disable_input] is
false and regardless if it's currently focused or not.
NOTIFICATION_WM_POSITION_CHANGED:null = 1012
Notification received when the window is moved.
NOTIFICATION_OS_MEMORY_WARNING:null = 2009
Notification received from the OS when the application is exceeding its allocated memory.
Implemented only on iOS.
NOTIFICATION_TRANSLATION_CHANGED:null = 2010
Notification received when translations may have changed. Can be triggered by the user changing the locale, changing
auto_translate_mode or when the node enters the scene tree. Can be used to respond to language changes, for example to change the UI strings on the fly. Useful when working with the built-in translation support, like [method Object.tr].
Note: This notification is received alongside
NOTIFICATION_ENTER_TREE, so if you are instantiating a scene, the child nodes will not be initialized yet. You can use it to setup translations for this node, child nodes created from script, or if you want to access child nodes added in the editor, make sure the node is ready using
is_node_ready.
func _notification(what):
if what == NOTIFICATION_TRANSLATION_CHANGED:
if not is_node_ready():
await ready # Wait until ready signal.
$Label.text = atr("%d Bananas") % banana_counter
NOTIFICATION_WM_ABOUT:null = 2011
Notification received from the OS when a request for "About" information is sent.
Implemented only on macOS.
NOTIFICATION_CRASH:null = 2012
Notification received from Godot's crash handler when the engine is about to crash.
Implemented on desktop platforms, if the crash handler is enabled.
NOTIFICATION_OS_IME_UPDATE:null = 2013
Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string).
Implemented on desktop and web platforms.
NOTIFICATION_APPLICATION_RESUMED:null = 2014
Notification received from the OS when the application is resumed.
Specific to the Android and iOS platforms.
NOTIFICATION_APPLICATION_PAUSED:null = 2015
Notification received from the OS when the application is paused.
Specific to the Android and iOS platforms.
Note: On iOS, you only have approximately 5 seconds to finish a task started by this signal. If you go over this allotment, iOS will kill the app instead of pausing it.
NOTIFICATION_APPLICATION_FOCUS_IN:null = 2016
Notification received from the OS when the application is focused, i.e. when changing the focus from the OS desktop or a thirdparty application to any open window of the Godot instance.
Implemented on desktop and mobile platforms.
NOTIFICATION_APPLICATION_FOCUS_OUT:null = 2017
Notification received from the OS when the application is defocused, i.e. when changing the focus from any open window of the Godot instance to the OS desktop or a thirdparty application.
Implemented on desktop and mobile platforms.
NOTIFICATION_TEXT_SERVER_CHANGED:null = 2018
Notification received when the
TextServer is changed.
NOTIFICATION_ACCESSIBILITY_UPDATE:null = 3000
Notification received when an accessibility information update is required.
NOTIFICATION_ACCESSIBILITY_INVALIDATE:null = 3001
Notification received when accessibility elements are invalidated. All node accessibility elements are automatically deleted after receiving this message, therefore all existing references to such elements should be discarded.