From 154da0733a958288b504290a694013dce5c5ded6 Mon Sep 17 00:00:00 2001 From: Florian Heide <58045864+sheshire63@users.noreply.github.com> Date: Sat, 3 Jul 2021 23:04:56 +0200 Subject: [PATCH] Update making_main_screen_plugins.rst updated the function name from get_editor_viewport() to get_editor_main_control() --- tutorials/plugins/editor/making_main_screen_plugins.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tutorials/plugins/editor/making_main_screen_plugins.rst b/tutorials/plugins/editor/making_main_screen_plugins.rst index f8d5ba785..1a09aec60 100644 --- a/tutorials/plugins/editor/making_main_screen_plugins.rst +++ b/tutorials/plugins/editor/making_main_screen_plugins.rst @@ -110,7 +110,7 @@ Here is the full plugin script: func _enter_tree(): main_panel_instance = MainPanel.instance() # Add the main panel to the editor's main viewport. - get_editor_interface().get_editor_viewport().add_child(main_panel_instance) + get_editor_interface().get_editor_main_control().add_child(main_panel_instance) # Hide the main panel. Very much required. make_visible(false) @@ -142,8 +142,8 @@ a reference to the scene, and we instance it into `main_panel_instance`. The ``_enter_tree()`` function is called before ``_ready()``. This is where we instance the main panel scene, and add them as children of specific parts -of the editor. We use ``get_editor_interface().get_editor_viewport()`` to -obtain the viewport and add our main panel instance as a child to it. +of the editor. We use ``get_editor_interface().get_editor_main_control()`` to +obtain the main editor control and add our main panel instance as a child to it. We call the ``make_visible(false)`` function to hide the main panel so it doesn't compete for space when first activating the plugin.