EditorImportPlugin

    Category: Core

    Registers a custom resource importer in the editor. Use the class to parse any file and import it as a new resource type.

    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 with EditorPlugin.add_import_plugin.

    EditorImportPlugins work by associating with specific file extensions and a resource type. See and 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 directory.

    • get_import_options ( int preset ) virtual

    Get the options and default values for the preset at this index. Returns an Array of Dictionaries with the following keys: name, default_value, (optional), hint_string (optional), usage (optional).


    • get_import_order ( ) virtual

    Get the order of this importer to be run when importing resources. Higher values will be called later. Use this to ensure the importer runs after the dependencies are already imported.


    • String get_importer_name ( ) virtual

    Get the unique name of the importer.


    • get_option_visibility ( String option, options ) virtual

    • int get_preset_count ( ) virtual

    Get the number of initial presets defined by the plugin. Use to get the default options for the preset and get_preset_name to get the name of the preset.



    • get_priority ( ) virtual

    Get the priority of this plugin for the recognized extension. Higher priority plugins will be preferred. Default value is 1.0.


    • Array get_recognized_extensions ( ) virtual

    Get the list of file extensions to associate with this loader (case insensitive). e.g. .


    • get_resource_type ( ) virtual

    Get the Godot resource type associated with this loader. e.g. "Mesh" or "Animation".


    • String get_save_extension ( ) virtual

    Get the extension used to save this resource in the directory.


    • get_visible_name ( ) virtual