Make EditorInterface accessible as a singleton
- EditorPlugin.get_editor_interface() is removed as redundant.
This commit is contained in:
@ -5,7 +5,16 @@
|
||||
</brief_description>
|
||||
<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.
|
||||
[b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorPlugin.get_editor_interface].
|
||||
[b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton directly by its name.
|
||||
[codeblocks]
|
||||
[gdscript]
|
||||
var editor_settings = EditorInterface.get_editor_settings()
|
||||
[/gdscript]
|
||||
[csharp]
|
||||
// In C# you can access it via the static Singleton property.
|
||||
EditorSettings settings = EditorInterface.Singleton.GetEditorSettings();
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
|
||||
Reference in New Issue
Block a user