Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
FileSystemDock
继承: VBoxContainer < BoxContainer < Container < Control < CanvasItem < Node < Object
Godot 编辑器中用于管理项目文件的停靠面板。
描述
这个类仅在 EditorPlugin 中可用,无法实例化。可以使用 EditorInterface.get_file_system_dock() 访问。
虽然 FileSystemDock 没有暴露任何操作文件的方法,但是你可以监听各种与文件相关的信号。
方法
void |
add_resource_tooltip_plugin(plugin: EditorResourceTooltipPlugin) |
void |
navigate_to_path(path: String) |
void |
remove_resource_tooltip_plugin(plugin: EditorResourceTooltipPlugin) |
信号
display_mode_changed() 🔗
用户切换文件显示模式或分隔模式时发出。
给定的文件 file
被移除时发出。
files_moved(old_file: String, new_file: String) 🔗
文件从 old_file
路径移动到 new_file
路径时发出。
folder_color_changed() 🔗
当目录改变颜色时发出。
folder_moved(old_folder: String, new_folder: String) 🔗
文件夹从 old_folder
路径移动到 new_folder
路径时发出。
folder_removed(folder: String) 🔗
给定的文件夹 folder
被移除时发出。
创建新场景,且该场景继承自位于 file
路径的场景时发出。
instantiate(files: PackedStringArray) 🔗
在编辑器中实例化给定场景时发出。
resource_removed(resource: Resource) 🔗
外部资源 resource
的对应文件被移除时发出。
方法说明
void add_resource_tooltip_plugin(plugin: EditorResourceTooltipPlugin) 🔗
注册一个新的 EditorResourceTooltipPlugin。
将给定的 path
设置为当前选定的路径,能够确保选中的文件/目录可见。
void remove_resource_tooltip_plugin(plugin: EditorResourceTooltipPlugin) 🔗
移除一个 EditorResourceTooltipPlugin。如果该插件尚未添加,则失败。