diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index b79d1243ba6..673764b317b 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -3920,6 +3920,18 @@ void EditorInspector::_clear(bool p_hide_plugins) { memdelete(favorites_groups_vbox->get_child(0)); } + if (p_hide_plugins) { + for (KeyValue> &F : editor_property_map) { + for (EditorProperty *property : F.value) { + // Circumvent special case that makes the Resource property not folding. + EditorPropertyResource *ep = Object::cast_to(property); + if (ep) { + ep->fold_resource(); + } + } + } + } + while (main_vbox->get_child_count()) { memdelete(main_vbox->get_child(0)); }