Asset Import Pipeline
When you add files to your project, Godot automatically:- Detects the file type based on extension
- Selects an appropriate importer
- Processes the file with import settings
- Saves the imported resource to
.godot/imported/ - Creates a
.importfile to track settings
How Imports Work
ResourceImporter Base Class
All importers inherit fromResourceImporter:
Import Order
Importers run in a specific order to handle dependencies:IMPORT_ORDER_DEFAULT(0) - Most importersIMPORT_ORDER_SCENE(100) - Scene importers (run last)
Creating Custom Import Plugins
ExtendEditorImportPlugin to create custom importers:
Return
OK (or @GlobalScope.OK) for successful imports, other error codes for failures.Register the Import Plugin
Import Presets
Presets provide predefined configurations for different use cases:Conditional Options
Show or hide options based on other settings:Importing 3D Models
For 3D formats like GLTF and FBX, useEditorSceneFormatImporter:
Import Flags
Scene importers can check flags to determine what to import:IMPORT_SCENE- Import as sceneIMPORT_ANIMATION- Import animationsIMPORT_FAIL_ON_MISSING_DEPENDENCIES- Fail if dependencies missingIMPORT_GENERATE_TANGENT_ARRAYS- Generate tangent arraysIMPORT_USE_NAMED_SKIN_BINDS- Use named skin bindingsIMPORT_DISCARD_MESHES_AND_MATERIALS- Import only structureIMPORT_FORCE_DISABLE_MESH_COMPRESSION- Disable compression
Importing Textures
For custom texture formats:Importing Audio Files
Thread Safety
Indicate if your importer can run in parallel:Versioning Imports
Increment the format version when making breaking changes:Appending External Resources
Import additional dependencies during the import process:Common Import Patterns
Atlas/Sprite Sheet Importer
CSV Data Importer
Best Practices
Handle errors gracefully
Handle errors gracefully
Always check file operations and return appropriate error codes. Provide helpful error messages.
Use appropriate import order
Use appropriate import order
Set
_get_import_order() correctly so resources import before scenes that use them.Implement proper presets
Implement proper presets
Provide meaningful presets for common use cases (Low/Medium/High quality, etc.).
Make options discoverable
Make options discoverable
Use property hints to make options user-friendly with dropdowns, ranges, and clear labels.
Document your importer
Document your importer
Provide clear visible names and descriptions for your import options.
See Also
Editor Plugins
Learn how to create and register editor plugins
Custom Nodes
Create custom node types with tool scripts