Install Asset
Install via Godot
To maintain one source of truth, Godot Asset Library is just a mirror of the old asset library so you can download directly on Godot via the integrated asset library browser
Quick Information
Makes it easy to give Resources custom file extensions by simply giving them "tresCustom" and/or "binaryCustom" constant.
J-Custom_Extensions
A Godot plugin that simplifies the process of creating custom resource file types in Godot. Instead of relying on standard .tres (text) or .res (binary) formats, you can define your own custom extensions and associate them with your resource classes.
Installation
- Copy the
addonsfolder into your project. - In the Godot editor, go to Project → Project Settings → Plugins and enable J-Custom_Extensions.
Defining Custom Extensions
To register a custom extension for a resource class, add a constant to your class definition:
Minimal Example
extends Resource
class_name MyCustomResource
const tresCustom = "mcr" # Custom alternative "tres" extension
const binaryCustom = "mcrb" # Custom alternative "res" extension
@export var data: String = "example"
@export var value: int = 0
Notes:
- Do not include the dot when defining
tresCustomorbinaryCustom. - Any
Resourcesthat are extensions of ones with defined custom extensions will also inherit them. - Custom extensions do work in exported projects.
Refreshing Extensions
If you add or modify custom extensions in your classes they will need to be refreshed, this is done automatically when the engine is restarted but can also be done manually:
- Go to Tools → Refresh Custom Extensions in the Godot editor
- Or call
build_map()on the extension mapper at runtime
How It Works
Architecture
The plugin consists of three main components:
- main.gd - The plugin entry point that manages the editor integration
- extension_mapper.gd - Scans project classes and maintains extension mappings
- save_loader.gd - Implements custom ResourceFormatLoader and ResourceFormatSaver
Requirements
- Godot 4.0+
- Custom resource classes must be globally registered (using
class_name)
License
See LICENSE
Support & Troubleshooting
Extensions Not Loading
- Ensure your class has
class_namedefined - Verify the constant name is exactly
tresCustomorbinaryCustom - Try refreshing extensions via Tools → Refresh Custom Extensions
Custom Loader/Saver Not Recognized
- Check that the extension mapping file exists at
res://addons/J-Custom_Extensions/extension_map.tres - Restart the editor or refresh custom extensions via Tools → Refresh Custom Extensions if the file is corrupted
Runtime vs Editor Differences
- In the editor, the plugin dynamically manages the loader/saver
- At runtime, an autoloaded instance handles all custom extension operations
- Extension mappings are persistent and loaded automatically
Makes it easy to give Resources custom file extensions by simply giving them "tresCustom" and/or "binaryCustom" constant.
Reviews
Quick Information
Makes it easy to give Resources custom file extensions by simply giving them "tresCustom" and/or "binaryCustom" constant.