EditorInterface

Inherits: Node < Object

类别: 核心

简要说明

Godot编辑器的界面。

描述

editorInterface允许您控制Godot编辑器窗口。它允许自定义窗口、保存和(重新)加载场景、渲染网格预览、检查和编辑资源和对象,并提供对 EditorSettingsEditorFileSystemEditorResourcePreviewScriptEditor ,编辑器视区,以及有关场景的信息。

方法说明

  • void edit_resource ( Resource resource )

编辑给定的 Resource .

返回Godot编辑器窗口的主容器。例如,您可以使用它来检索容器的大小并相应地放置控件。

  • Node get_edited_scene_root ( )

返回已编辑(当前)场景的根 Node .

返回 EditorSettings .

返回编辑器 Viewport .

  • Array get_open_scenes ( ) const

返回一个 Array 当前打开的场景的文件路径。

返回 EditorFileSystem .

返回 EditorResourcePreview .

返回 ScriptEditor .

  • String get_selected_path ( ) const

返回 EditorSelection .

  • void inspect_object ( Object object, String for_property="" )

显示给定的上的给定属性 object 在编辑的检查器停靠中。

返回插件的启用状态。插件名与其目录名相同。

返回以给定大小呈现的网格预览 Array 属于 Texture S

  • void open_scene_from_path ( String scene_filepath )

在给定路径打开场景。

  • void reload_scene_from_path ( String scene_filepath )

在给定路径重新加载场景。

保存场景。返回 OKERR_CANT_CREATE (见 @GlobalScope 常量)。

  • void save_scene_as ( String path, bool with_preview=true )

将场景另存为文件 path .

  • void select_file ( String file )

选择文件,路径由 file ,在文件系统基座中。

  • void set_plugin_enabled ( String plugin, bool enabled )

设置插件的启用状态。插件名与其目录名相同。