Improve docs about plugin registration
This commit is contained in:
parent
90a1e51933
commit
7515af8c25
7 changed files with 16 additions and 9 deletions
|
|
@ -4,7 +4,7 @@
|
|||
Registers a custom resource importer in the editor. Use the class to parse any file and import it as a new resource type.
|
||||
</brief_description>
|
||||
<description>
|
||||
EditorImportPlugins provide a way to extend the editor's resource import functionality. Use them to import resources from custom files or to provide alternatives to the editor's existing importers. Register your [EditorPlugin] with [method EditorPlugin.add_import_plugin].
|
||||
[EditorImportPlugin]s provide a way to extend the editor's resource import functionality. Use them to import resources from custom files or to provide alternatives to the editor's existing importers.
|
||||
EditorImportPlugins work by associating with specific file extensions and a resource type. See [method _get_recognized_extensions] and [method _get_resource_type]. They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the [code].godot/imported[/code] directory (see [member ProjectSettings.application/config/project_data_dir_name]).
|
||||
Below is an example EditorImportPlugin that imports a [Mesh] from a file with the extension ".special" or ".spec":
|
||||
[codeblocks]
|
||||
|
|
@ -108,6 +108,7 @@
|
|||
}
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
To use [EditorImportPlugin], register it using the [method EditorPlugin.add_import_plugin] method first.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Import plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/import_plugins.html</link>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue