.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. .. _class_EditorResourcePreviewGenerator: EditorResourcePreviewGenerator ============================== **Inherits:** :ref:`Reference` **<** :ref:`Object` **Category:** Core Brief Description ----------------- Custom generator of previews. Member Functions ---------------- +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Texture` | :ref:`generate` **(** :ref:`Resource` from **)** virtual | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Texture` | :ref:`generate_from_path` **(** :ref:`String` path **)** virtual | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`handles` **(** :ref:`String` type **)** virtual | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ Description ----------- Custom code to generate previews. Please check "file_dialog/thumbnail_size" in EditorSettings to find out the right size to do previews at. Member Function Description --------------------------- .. _class_EditorResourcePreviewGenerator_generate: - :ref:`Texture` **generate** **(** :ref:`Resource` from **)** virtual Generate a preview from a given resource. This must be always implemented. Returning an empty texture is an OK way to fail and let another generator take care. Care must be taken because this function is always called from a thread (not the main thread). .. _class_EditorResourcePreviewGenerator_generate_from_path: - :ref:`Texture` **generate_from_path** **(** :ref:`String` path **)** virtual Generate a preview directly from a path, implementing this is optional, as default code will load and call generate() Returning an empty texture is an OK way to fail and let another generator take care. Care must be taken because this function is always called from a thread (not the main thread). .. _class_EditorResourcePreviewGenerator_handles: - :ref:`bool` **handles** **(** :ref:`String` type **)** virtual Return if your generator supports this resource type.