summaryrefslogtreecommitdiffstats
path: root/core/io/resource.cpp
diff options
context:
space:
mode:
authorMicky <micheledevita2@gmail.com>2022-10-08 14:47:58 +0200
committerMicky <micheledevita2@gmail.com>2023-09-09 13:51:12 +0200
commit79ce0c6e8052c065d88dbce5a2b7ff0d63fac3a7 (patch)
tree75b1338ee9ff3faebbb4994dbc0a27518b042ad1 /core/io/resource.cpp
parent8c1817f755b63a69378774d8d0f74499f663afe2 (diff)
downloadredot-engine-79ce0c6e8052c065d88dbce5a2b7ff0d63fac3a7.tar.gz
Reimplement Resource.`_local_to_scene_setup` & remove workaround
Reimplements the virtual method _setup_local_to_scene, lost in #51970 Also deprecates the redundant `setup_local_to_scene_requested` signal.
Diffstat (limited to 'core/io/resource.cpp')
-rw-r--r--core/io/resource.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/io/resource.cpp b/core/io/resource.cpp
index 68cdeabac7..e0d42a274a 100644
--- a/core/io/resource.cpp
+++ b/core/io/resource.cpp
@@ -379,8 +379,8 @@ Node *Resource::get_local_scene() const {
}
void Resource::setup_local_to_scene() {
- // Can't use GDVIRTUAL in Resource, so this will have to be done with a signal
emit_signal(SNAME("setup_local_to_scene_requested"));
+ GDVIRTUAL_CALL(_setup_local_to_scene);
}
void Resource::reset_local_to_scene() {
@@ -460,6 +460,7 @@ void Resource::_bind_methods() {
get_rid_bind.return_val.type = Variant::RID;
::ClassDB::add_virtual_method(get_class_static(), get_rid_bind, true, Vector<String>(), true);
+ GDVIRTUAL_BIND(_setup_local_to_scene);
}
Resource::Resource() :