summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-05-07 17:56:10 -0300
committerGitHub <noreply@github.com>2018-05-07 17:56:10 -0300
commit7b065a59fa1d413b4199bdd3e998cba717ebe90c (patch)
tree8bc3f9d886089ffee06ebdd76e6d32e63906234e /scene/main
parent69a96ff4a627fabea2bc40ed27b973f202c44825 (diff)
parenta826fb8d8b861efb0f7d14698148c5571687e082 (diff)
Merge pull request #15911 from Zephilinox/ready_signal
Add ready signal to Node
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 a1d79e7357..67ee246252 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);
}
}
@@ -2814,6 +2814,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"));