EditorInterface¶
类别: 核心
简要说明¶
Godot编辑器的界面。
方法¶
无效 |
edit_resource ( Resource resource ) |
get_base_control ( ) |
|
get_inspector ( ) const |
|
get_open_scenes ( ) const |
|
get_selected_path ( ) const |
|
get_selection ( ) |
|
无效 |
inspect_object ( Object object, String for_property="" ) |
is_plugin_enabled ( String plugin ) const |
|
make_mesh_previews ( Array meshes, int preview_size ) |
|
无效 |
open_scene_from_path ( String scene_filepath ) |
无效 |
reload_scene_from_path ( String scene_filepath ) |
save_scene ( ) |
|
无效 |
save_scene_as ( String path, bool with_preview=true ) |
无效 |
select_file ( String file ) |
无效 |
set_plugin_enabled ( String plugin, bool enabled ) |
描述¶
editorInterface允许您控制Godot编辑器窗口。它允许自定义窗口、保存和(重新)加载场景、渲染网格预览、检查和编辑资源和对象,并提供对 EditorSettings , EditorFileSystem , EditorResourcePreview , ScriptEditor ,编辑器视区,以及有关场景的信息。
方法说明¶
void edit_resource ( Resource resource )
编辑给定的 Resource .
Control get_base_control ( )
返回Godot编辑器窗口的主容器。例如,您可以使用它来检索容器的大小并相应地放置控件。
Node get_edited_scene_root ( )
返回已编辑(当前)场景的根 Node .
EditorSettings get_editor_settings ( )
返回 EditorSettings .
Control get_editor_viewport ( )
返回编辑器 Viewport .
EditorInspector get_inspector ( ) const
Array get_open_scenes ( ) const
返回一个 Array 当前打开的场景的文件路径。
EditorFileSystem get_resource_filesystem ( )
返回 EditorFileSystem .
EditorResourcePreview get_resource_previewer ( )
ScriptEditor get_script_editor ( )
返回 ScriptEditor .
String get_selected_path ( ) const
EditorSelection get_selection ( )
返回 EditorSelection .
显示给定的上的给定属性 object
在编辑的检查器停靠中。
返回插件的启用状态。插件名与其目录名相同。
返回以给定大小呈现的网格预览 Array 属于 Texture S
void open_scene_from_path ( String scene_filepath )
在给定路径打开场景。
void reload_scene_from_path ( String scene_filepath )
在给定路径重新加载场景。
Error save_scene ( )
保存场景。返回 OK
或 ERR_CANT_CREATE
(见 @GlobalScope 常量)。
将场景另存为文件 path
.
void select_file ( String file )
选择文件,路径由 file
,在文件系统基座中。
设置插件的启用状态。插件名与其目录名相同。