-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Add engine version number to resource, scene, and import files #4534
Comments
Are there cases when you don't want to have engine version in resource files? |
@me2beats: The engine version would be just a single line, and if size were an issue, it could be encoded not as string but as e.g. hex to make the size even less of an issue. |
We discussed this in a PR review meeting, and the amount of noise generated by including this information in all resources doesn't seem to be worth the described use case. VCS history will be a mess if all files change every time you open the project in a new build (which can happen several times per day if you compile from the master branch). We could save less information (e.g. only #4355 suggests to add this information only to What could be useful to ensure that all files are tracking the same engine version as documented by |
Describe the project you are working on
Pipeline tools for Godot, as part of V-Sekai, to import assets and allow in-editor creation of Godot-native assets.
Describe the problem or limitation you are having in your project
When engine upgrades occur, there is a risk of default property values being changed.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Godot-native formats should include the engine version (major, minor, patch, extra) which produced the asset.
Currently, changes to default values in the engine will lose information since the old default value is not stored anywhere. Sometimes the new default value is desired, but other times, it will have a significant change to appearance that would cause existing assets to break. In this case, it may be helpful to know the last version of the engine the file was serialized on, in order to use older default values.
It may also be useful for project migration tools, such as [godotengine/godot#51950] to know the previous version of the editor in order to make a more accurate conversion.
There is a similar proposal here ( #4355 ) for project.godot itself, but there may be cases where the project and the assets are imported separately, such as via the Asset Lib
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
The idea is to add the editor_version to files when saving them, and pass the data into resources when constructing it from serialized values. The information need only be saved once per file. Some optimization could be made to exclude this string from .pck files if size is a problem.
This includes .tres
and .tscn
(there would need to be a change to .res and .scn to add editor version here, too.)
as well as *.import files:
There's a question about whether it would be helpful for other Godot-native formats, such as shaders or GDScript, to include a line
@editor_version("4.0.alpha.custom_build [123456789]")
in case porting tools can use this information to upgrade scripts during engine changes, but I am more skeptical that this will provide enough value to be worth the clutter.If it's simpler, it could also be added as a separate property under the first line, like:
If this enhancement will not be used often, can it be worked around with a few lines of script?
A script would not be able to add this data into all resources and nodes, including built-in types.
Is there a reason why this should be core and not an add-on in the asset library?
it affects
ResourceLoader
andResourceSaver
, which are core.The text was updated successfully, but these errors were encountered: