summaryrefslogtreecommitdiff
path: root/editor/plugins/theme_editor_preview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/theme_editor_preview.cpp')
-rw-r--r--editor/plugins/theme_editor_preview.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/theme_editor_preview.cpp b/editor/plugins/theme_editor_preview.cpp
index cb7b5949d1..0b02150444 100644
--- a/editor/plugins/theme_editor_preview.cpp
+++ b/editor/plugins/theme_editor_preview.cpp
@@ -403,7 +403,7 @@ void SceneThemeEditorPreview::_reload_scene() {
preview_content->remove_child(node);
}
- Node *instance = loaded_scene->instance();
+ Node *instance = loaded_scene->instantiate();
if (!instance || !Object::cast_to<Control>(instance)) {
EditorNode::get_singleton()->show_warning(TTR("Invalid PackedScene resource, must have a Control node at its root."));
emit_signal("scene_invalidated");
@@ -435,7 +435,7 @@ bool SceneThemeEditorPreview::set_preview_scene(const String &p_path) {
return false;
}
- Node *instance = loaded_scene->instance();
+ Node *instance = loaded_scene->instantiate();
if (!instance || !Object::cast_to<Control>(instance)) {
EditorNode::get_singleton()->show_warning(TTR("Invalid PackedScene resource, must have a Control node at its root."));
return false;