From 79ce0c6e8052c065d88dbce5a2b7ff0d63fac3a7 Mon Sep 17 00:00:00 2001 From: Micky Date: Sat, 8 Oct 2022 14:47:58 +0200 Subject: 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. --- core/io/resource.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/io/resource.cpp') 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(), true); + GDVIRTUAL_BIND(_setup_local_to_scene); } Resource::Resource() : -- cgit v1.2.3