EditorInterface¶
Godot editor’s interface.
Description¶
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 EditorSettings, EditorFileSystem, EditorResourcePreview, ScriptEditor, the editor viewport, and information about scenes.
Note: This class shouldn’t be instantiated directly. Instead, access the singleton using EditorPlugin.get_editor_interface.
Methods¶
Method Descriptions¶
- void edit_resource ( Resource resource )
Edits the given Resource.
- Control 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.
- String get_current_path ( ) const
- Node get_edited_scene_root ( )
Returns the edited (current) scene’s root Node.
- EditorSettings get_editor_settings ( )
Returns the EditorSettings.
- Control get_editor_viewport ( )
Returns the editor Viewport.
- FileSystemDock get_file_system_dock ( )
- EditorInspector get_inspector ( ) const
- Array get_open_scenes ( ) const
Returns an Array with the file paths of the currently opened scenes.
- EditorFileSystem get_resource_filesystem ( )
Returns the EditorFileSystem.
- EditorResourcePreview get_resource_previewer ( )
Returns the EditorResourcePreview.
- ScriptEditor get_script_editor ( )
Returns the ScriptEditor.
- String get_selected_path ( ) const
- EditorSelection get_selection ( )
Returns the EditorSelection.
Shows the given property on the given object
in the Editor’s Inspector dock.
Returns the enabled status of a plugin. The plugin name is the same as its directory name.
Returns mesh previews rendered at the given size as an Array of Textures.
- void open_scene_from_path ( String scene_filepath )
Opens the scene at the given path.
- void reload_scene_from_path ( String scene_filepath )
Reloads the scene at the given path.
- Error save_scene ( )
Saves the scene. Returns either OK
or ERR_CANT_CREATE
(see @GlobalScope constants).
Saves the scene as a file at path
.
- void select_file ( String file )
Selects the file, with the path provided by file
, in the FileSystem dock.
- void set_distraction_free_mode ( bool enter )
- void set_main_screen_editor ( String name )
Sets the enabled status of a plugin. The plugin name is the same as its directory name.