-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
.tres file with a Dictionary/Array with a Resource is only saved the first time (or when the Dictionary/Array is expanded again) #55885
Comments
I now had a look in the code. The issue is also present in 4.0. Basically when a When the If someone more into the editor code wants to have a look I'm glad to help if needed. :) |
I had a similar issue for editor plugins when using arrays and dictionaries. Things are saved only the first time. Related issue AnidemDex/Godot-EventSystem#23 |
Yes, I can confirm it does not work for Arrays either. In Another way would be, that a Resource inside an Array/Dictionary will not just mark himself as edited but also their 'parent' (The Array/Dictionary himself). But don't know, if this is possible either currently. |
@Maran23 https://github.com/AnidemDex/Godot-EventSystem/blob/2b24de5c79cae88ff65db7ee8b08483d6f4069ae/addons/event_system_plugin/resources/timeline_class/timeline_class.gd#L22-L35 But is a bit annoying since not every change in subresource means that the main resource changed (wich is annoying when you make custom inspectors that relies on that signal). |
@AnidemDex I finally found a good fix for the problem and opened a PR. :) |
Redo edited subresource (and resource) saving in a much more simplified way. I think this should work (unless I am missing something) and be faster than what is there. It should also supersede godotengine#55885. I am not 100% entirely convinced that this approach works, but I think it should so please test.
Redo edited subresource (and resource) saving in a much more simplified way. I think this should work (unless I am missing something) and be faster than what is there. It should also supersede godotengine#55885. I am not 100% entirely convinced that this approach works, but I think it should so please test. (cherry picked from commit 9eb5f2a)
Redo edited subresource (and resource) saving in a much more simplified way. I think this should work (unless I am missing something) and be faster than what is there. It should also supersede godotengine#55885. I am not 100% entirely convinced that this approach works, but I think it should so please test. (cherry picked from commit 9eb5f2a)
Godot version
3.x, 4.0
System information
Windows 10
Issue description
First of all: This only happens when using a
Resource
inside aDictionary
orArray
.Editing and saving a
.tres
file will work only the first time. When editing and saving again, nothing will happen (can be checked by opening the.tres
file in a text editor).I debugged a bit and found out that it works due to the
Dictionary
/Array
expand, which will set theDictionary
/Array
toedited
.That's why it works the first time.
As soon as I at least once collapse/expand the
Dictionary
/Array
again the save will work again for the first time.Steps to reproduce
Dictionary
Minimal reproduction project
GodotSaveBug.zip
The text was updated successfully, but these errors were encountered: