-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Saved resources will preserve default exported variable values #80894
Comments
MRP for 4.x: PropertySize.zip. |
We may want to add an annotation to control this behavior (with the default being "don't save"), as it can be desired in some cases. This needs more core changes though, so it can be left for later. |
Yes, I suggested something like that (godotengine/godot-proposals#2581 (comment)). For example, theme property overrides have a checkbox - if you check it, the value will be saved always. And also when inheriting scenes you can "pin" property (#52943). But I think this applies to all properties, both custom and standard. In my opinion this is definitely a bug, because it is inconsistent with the standard resource properties and any node properties: they are not saved in the file if they are default. |
|
PRs should first be opened against the master branch (if the bug is in master). Then the fix can be cherry-picked or reimplemented for older supported branches, if it's considered desirable and safe enough. |
Godot version
3.6 beta 2
System information
Windows 10 gtx 1060 6gb intel i5 4690k
Issue description
When you save a custom resource with exported vars, it will write the default value to the .tres file
Comparing to the Animation class
Only when you set a new value is that value written to file...
This also happens when you extend a Godot class, ie extends Animation, all new properties will have their default values written, but all the original ones belonging to the parent class will still function normally...
This adds a size + loading penalty for adding export vars.
Steps to reproduce
Minimal reproduction project
PropertySize.zip
The text was updated successfully, but these errors were encountered: