-
-
Notifications
You must be signed in to change notification settings - Fork 21k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugins cannot register their own ResourceFormatLoader #17463
Comments
It isn't the same, but you can make EditorImportPlugin that hanle custom resource and saves original data in .import folder. I use this approach for handling Spine types (json/skel/atlas) and this works fine. I'm also not sure how ResourceFormatLoader should handle type collisions - json common format for storing different resources for example. |
It's indeed a different thing, it would not solve my use case since it's not something I need at import, but on load and save. |
I also realized that due to this, it's also impossible for a plugin to register its own saving progress. If you use Ctrl+S but your custom resource uses a thread or multiple steps to save, you need a way to notify these steps to the editor with a progress bar. Just having a callback that has to complete immediately only in |
Some questions about how to expose this functionality: I had a look at the C++ code and an issue is, Another thing: should it be something exposed in EditorPlugin? Or somewhere else? And yet another thing: |
Came here to post this as a new issue. The documentation of ResourceFormatLoader outright states, and I quote, "Extending this class allows you to define your own loader.". However, right now this is only true for Godot modules. It doesn't work for GDScript, and it doesn't even work in GDNative. Until this issue is resolved, perhaps it would be best to make a note in the documentation about this limitation. |
Oh, actually this issue has been solved by #19501, hasn't it? As the doc says, you can now do this by extending the said class, with the I don't know about GDNative but I'm sure it worked there before. |
I haven't tested GDScript in depth, but this clearly does not work in GDNative. |
@rainerdeyke either we need to fetch the custom loaders from a lib when it's loaded, or change the time at which |
Feature and improvement proposals for the Godot Engine are now being discussed and reviewed in a dedicated Godot Improvement Proposals (GIP) (godotengine/godot-proposals) issue tracker. The GIP tracker has a detailed issue template designed so that proposals include all the relevant information to start a productive discussion and help the community assess the validity of the proposal for the engine. The main (godotengine/godot) tracker is now solely dedicated to bug reports and Pull Requests, enabling contributors to have a better focus on bug fixing work. Therefore, we are now closing all older feature proposals on the main issue tracker. If you are interested in this feature proposal, please open a new proposal on the GIP tracker following the given issue template (after checking that it doesn't exist already). Be sure to reference this closed issue if it includes any relevant discussion (which you are also encouraged to summarize in the new proposal). Thanks in advance! |
This was solved already, however there seems to be an issue for GDNative to use the system. |
Godot 3.0.2 stable
It's currently not possible for a plugin to register a custom
ResourceFormatLoader
. As a result, GDScript and GDNative plugins are unable to register their own kinds of resources without using the default .tres and .res formats.I need this for my terrain plugin in order to have more control over the way data gets loaded and saved.
The text was updated successfully, but these errors were encountered: