summaryrefslogtreecommitdiff
path: root/editor/plugins/material_editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/material_editor_plugin.cpp')
-rw-r--r--editor/plugins/material_editor_plugin.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp
index eb14495b9c..f63bcb69b8 100644
--- a/editor/plugins/material_editor_plugin.cpp
+++ b/editor/plugins/material_editor_plugin.cpp
@@ -117,9 +117,9 @@ MaterialEditor::MaterialEditor() {
add_child(vc);
vc->set_anchors_and_margins_preset(PRESET_WIDE);
viewport = memnew(SubViewport);
- Ref<World3D> world;
- world.instance();
- viewport->set_world(world); //use own world
+ Ref<World3D> world_3d;
+ world_3d.instance();
+ viewport->set_world_3d(world_3d); //use own world
vc->add_child(viewport);
viewport->set_disable_input(true);
viewport->set_transparent_background(true);