EditorInterface

    Category: Core

    Godot editor’s interface.

    EditorInterface gives you control over Godot editor’s window. It allows customizing the window, saving and (re-)loading scenes, rendering mesh previews, inspecting and editing resources and objects, and provides access to , EditorFileSystem, , ScriptEditor, the editor viewport, and information about scenes.

    • void edit_resource ( resource )

    Edits the given Resource.


    • get_base_control ( )

    Returns the main container of Godot editor’s window. You can use it, for example, to retrieve the size of the container and place your controls accordingly.


    • Node get_edited_scene_root ( )

    Returns the edited (current) scene’s root .



    Returns the editor .



    • get_open_scenes ( ) const

    Returns an Array with the file paths of the currently opened scenes.


    • get_resource_filesystem ( )

    Returns the EditorFileSystem.


    • get_resource_previewer ( )

    Returns the EditorResourcePreview.


    • get_script_editor ( )

    Returns the ScriptEditor.


    • get_selected_path ( ) const

    Returns the EditorSelection.


    • void inspect_object ( object, String for_property=”” )

    • is_plugin_enabled ( String plugin ) const

    Returns the enabled status of a plugin. The plugin name is the same as its directory name.


    • make_mesh_previews ( Array meshes, preview_size )

    Returns mesh previews rendered at the given size as an Array of s.


    • void open_scene_from_path ( String scene_filepath )

    Opens the scene at the given path.


    • void reload_scene_from_path ( scene_filepath )

    Reloads the scene at the given path.


    Saves the scene. Returns either OK or ERR_CANT_CREATE. See constants.


    • void save_scene_as ( String path, with_preview=true )

    Saves the scene as a file at path.



    • void set_plugin_enabled ( String plugin, enabled )