summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
authorZephilinox <zephilinox@hotmail.co.uk>2018-01-20 21:57:59 +0000
committerZephilinox <zephilinox@hotmail.co.uk>2018-01-20 21:57:59 +0000
commita826fb8d8b861efb0f7d14698148c5571687e082 (patch)
treef903cfe32f0c38b129effb0695c8c578d98c495f /scene/main
parentc58891ff4ce9559fb1413d34159d3fb039999402 (diff)
Add ready signal to Node
Closes #15889
Diffstat (limited to 'scene/main')
-rw-r--r--scene/main/node.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index ac85dd64af..b5b1f79d42 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -136,7 +136,6 @@ void Node::_notification(int p_notification) {
get_script_instance()->call_multilevel_reversed(SceneStringNames::get_singleton()->_ready, NULL, 0);
}
- //emit_signal(SceneStringNames::get_singleton()->enter_tree);
} break;
case NOTIFICATION_POSTINITIALIZE: {
@@ -180,6 +179,7 @@ void Node::_propagate_ready() {
if (data.ready_first) {
data.ready_first = false;
notification(NOTIFICATION_READY);
+ emit_signal(SceneStringNames::get_singleton()->ready);
}
}
@@ -2952,6 +2952,7 @@ void Node::_bind_methods() {
BIND_ENUM_CONSTANT(DUPLICATE_SCRIPTS);
BIND_ENUM_CONSTANT(DUPLICATE_USE_INSTANCING);
+ ADD_SIGNAL(MethodInfo("ready"));
ADD_SIGNAL(MethodInfo("renamed"));
ADD_SIGNAL(MethodInfo("tree_entered"));
ADD_SIGNAL(MethodInfo("tree_exiting"));