diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index a83dedad6db..e7727aec4bc 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -1683,6 +1683,32 @@ bool SceneTreeDock::_check_node_path_recursive(Node *p_root_node, Variant &r_var } } break; + case Variant::OBJECT: { + Resource *resource = Object::cast_to(r_variant); + if (!resource) { + break; + } + + List properties; + resource->get_property_list(&properties); + + for (const PropertyInfo &E : properties) { + if (!(E.usage & (PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_EDITOR))) { + continue; + } + String propertyname = E.name; + Variant old_variant = resource->get(propertyname); + Variant updated_variant = old_variant; + if (_check_node_path_recursive(p_root_node, updated_variant, p_renames)) { + EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton(); + undo_redo->add_do_property(resource, propertyname, updated_variant); + undo_redo->add_undo_property(resource, propertyname, old_variant); + resource->set(propertyname, updated_variant); + } + } + break; + }; + default: { } }