-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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 resource loses data when duplicated #94242
Comments
|
This is due to cyclic dependencies and loading order. You want to have a constant in a class with instances of the same class, but this does not work as expected. If you move the constant to another class ( MRP: test-94242.zip |
Ah, I see, should I close this issue then? |
I think no. Even if we don't support this case, it should probably produce an error since constants are evaluated at compile time. |
Tested versions
System information
Godot v4.2.2.stable (15073af) - Freedesktop SDK 23.08 (Flatpak runtime) - Wayland - Vulkan (Forward+) - integrated Intel(R) UHD Graphics (ICL GT1) () - Intel(R) Core(TM) i3-1005G1 CPU @ 1.20GHz (4 Threads)
Issue description
When duplicating a saved resource, it's data seems to get lost.
The resource:
The code:
When trying to get the values from the resource it returns the values that were predefined, in this case, if I try to get the "name" property, it'll return "item" instead of "garden_key".
When also trying to access the data of the resource directly (load("path").property) I get an error that says the property does not exist, even though it should
Steps to reproduce
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered: