1 Star 1 Fork 0

天天编程/godot-docs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
class_editorresourcepreview.rst 5.86 KB
一键复制 编辑 原始数据 按行查看 历史
github_url: hide

EditorResourcePreview

Inherits: :ref:`Node<class_Node>` < :ref:`Object<class_Object>`

Helper to generate previews of resources or files.

Description

This object is used to generate previews for resources of files.

Methods

void :ref:`add_preview_generator<class_EditorResourcePreview_method_add_preview_generator>` ( :ref:`EditorResourcePreviewGenerator<class_EditorResourcePreviewGenerator>` generator )
void :ref:`check_for_invalidation<class_EditorResourcePreview_method_check_for_invalidation>` ( :ref:`String<class_String>` path )
void :ref:`queue_edited_resource_preview<class_EditorResourcePreview_method_queue_edited_resource_preview>` ( :ref:`Resource<class_Resource>` resource, :ref:`Object<class_Object>` receiver, :ref:`StringName<class_StringName>` receiver_func, :ref:`Variant<class_Variant>` userdata )
void :ref:`queue_resource_preview<class_EditorResourcePreview_method_queue_resource_preview>` ( :ref:`String<class_String>` path, :ref:`Object<class_Object>` receiver, :ref:`StringName<class_StringName>` receiver_func, :ref:`Variant<class_Variant>` userdata )
void :ref:`remove_preview_generator<class_EditorResourcePreview_method_remove_preview_generator>` ( :ref:`EditorResourcePreviewGenerator<class_EditorResourcePreviewGenerator>` generator )

Signals

Emitted if a preview was invalidated (changed). path corresponds to the path of the preview.

Method Descriptions

Create an own, custom preview generator.


Check if the resource changed, if so, it will be invalidated and the corresponding signal emitted.


Queue a resource being edited for preview (using an instance). Once the preview is ready, your receiver.receiver_func will be called either containing the preview texture or an empty texture (if no preview was possible). Callback must have the format: (path,texture,userdata). Userdata can be anything.


Queue a resource file for preview (using a path). Once the preview is ready, your receiver.receiver_func will be called either containing the preview texture or an empty texture (if no preview was possible). Callback must have the format: (path,texture,userdata). Userdata can be anything.


Removes a custom preview generator.

Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ttcode-net/godot-docs.git
git@gitee.com:ttcode-net/godot-docs.git
ttcode-net
godot-docs
godot-docs
master

搜索帮助