1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-28 16:07:14 +00:00

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.
This commit is contained in:
Micky
2022-10-08 14:47:58 +02:00
parent 8c1817f755
commit 79ce0c6e80
3 changed files with 24 additions and 5 deletions

View File

@@ -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() :