-
-
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 integrate custom resources into the save and load process #19185
Comments
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! |
Godot 3.0.2
I'm having an issue with my plugin which badly affects usability right now: Zylann/godot_heightmap_plugin#4
Short version:
I haven't much problems about how to save my data itself (that would eventually be covered in #17463).
The problem I have here, is when do I save it.
Detailed version:
I made a plugin that defines a custom HTerrain node.
In order to work, a HTerrain node need to know which terrain data to use.
Currently, this data is implemented as a dummy resource for the sole purpose of interfacing with Godot's saving system. That resource only hold a path to where the big data is.
The big data is mostly composed of resources Godot already handles (most are textures, others are binaries), but cannot be just assigned by the user in the inspector because they are generated and numerous.
They must be saved under a folder, not a single resource, because there are multiple big files involved. Also, because a terrain is big, it is designed to be able to save and load asynchronously with a progress bar.
When a user hits Ctrl+S to save a new scene with a terrain inside, I need to:
Problems:
EditorPlugin
hasqueue_save_layout
andsave_external_data
, but they are not suitable when the terrain node is not selected. It would require the plugin to parse the whole scene to find all terrains, and there is no info where the scene gets saved anyways.Note that so far I described a process involving a Resource. The reason I keep it is, the only thing Godot can save must be a Resource. But as you saw, what I want is not really a custom resource format, but a way to save many files, which are already supported in Godot, organized in a specific way, under a folder, as the user saves the scene.
The current workaround I have is to not save the terrain on Ctrl+S. Instead, I have a separate menu when the node is selected, on which you can "Save terrain" and "Load terrain", however this is not intuitive at all.
Related to #17463.
The text was updated successfully, but these errors were encountered: