You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using resources to serve as a savegame, and resources nested within the Save resource to represent data from the game (e.g., player stats, inventory). However, it appears that when there are variables passed through the _init() function of the nested resources, SubResource, Godot doesn't deserialize the nested resource properly.
For example, you won't be able to access the hp value of the nested resource here.
Steps to reproduce
Minimal Reproduction Project
Run project, click save button.
Save button will create a new .tres save resource, and pass a variable through _init() of the nested subresource.
Click load button.
Load button will attempt to read the subresource's hp value, at which point Godot throws an error.
The text was updated successfully, but these errors were encountered:
Sirosky
changed the title
ResourceLoader fails to load nested resources saved in .tres files when a value is passed through the _init of such subresource.
ResourceLoader fails to load nested resources saved in .tres files when a value is passed through the _init of such nested resource.
Dec 31, 2022
Godot version
Godot_v4.0-beta10_win64
System information
Windows 11, Vulkan, Intel integrated graphics
Issue description
I've been using resources to serve as a savegame, and resources nested within the
Save
resource to represent data from the game (e.g., player stats, inventory). However, it appears that when there are variables passed through the_init()
function of the nested resources,SubResource
, Godot doesn't deserialize the nested resource properly.For example, you won't be able to access the
hp
value of the nested resource here.Steps to reproduce
Minimal Reproduction Project
_init()
of the nested subresource.hp
value, at which point Godot throws an error.Minimal reproduction project
ResourceFormatLoaderText Bug.zip
The text was updated successfully, but these errors were encountered: