From 1146172b302a68393e4f97b47e6460d78db75518 Mon Sep 17 00:00:00 2001 From: kobewi Date: Thu, 6 Apr 2023 14:47:49 +0200 Subject: Prevent errors when using ViewportTexture (cherry picked from commit 1b9802fa8cb45e876cd90d6a174b95b270a7f934) --- scene/main/node.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scene/main/node.cpp') diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 52c1df8110..057fd15f1b 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -2759,6 +2759,10 @@ bool Node::is_displayed_folded() const { return data.display_folded; } +bool Node::is_ready() const { + return !data.ready_first; +} + void Node::request_ready() { data.ready_first = true; } @@ -2897,6 +2901,7 @@ void Node::_bind_methods() { ClassDB::bind_method(D_METHOD("queue_free"), &Node::queue_free); ClassDB::bind_method(D_METHOD("request_ready"), &Node::request_ready); + ClassDB::bind_method(D_METHOD("is_node_ready"), &Node::is_ready); ClassDB::bind_method(D_METHOD("set_multiplayer_authority", "id", "recursive"), &Node::set_multiplayer_authority, DEFVAL(true)); ClassDB::bind_method(D_METHOD("get_multiplayer_authority"), &Node::get_multiplayer_authority); -- cgit v1.2.3