diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index f203c6b21de..cf958cbec01 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -583,13 +583,6 @@ Ref EditorPackedScenePreviewPlugin::generate_from_path(const String & } void EditorPackedScenePreviewPlugin::_setup_scene_3d(Node *p_node) const { - // Do not account any SubViewport at preview scene, as it would not render correctly - if (Object::cast_to(p_node) && p_node->get_parent()) { - p_node->get_parent()->remove_child(p_node); - callable_mp(p_node, &Node::queue_free).call_deferred(); - return; - } - // Don't let window to popup Window *window = Object::cast_to(p_node); if (window) { @@ -639,13 +632,6 @@ void EditorPackedScenePreviewPlugin::_setup_scene_3d(Node *p_node) const { } void EditorPackedScenePreviewPlugin::_setup_scene_2d(Node *p_node) const { - // Do not account any SubViewport at preview scene, as it would not render correctly - if (Object::cast_to(p_node) && p_node->get_parent()) { - p_node->get_parent()->remove_child(p_node); - callable_mp(p_node, &Node::queue_free).call_deferred(); - return; - } - // Don't let window to popup Window *window = Object::cast_to(p_node); if (window) {