Hello, to save some states when switching scenes, i've created a custom resource with only "global_position" as data for now. I also use ResourceSaver and ResourceLoader to handle this.
My issue is that i can't load the saved resource. In this code i save data in a path and load from the same path. The first print gives the expected value but the second gives (0,0).
If i manually create and retrieve a resource instance it works fine, but i want to create it via code with MyResource.new(). I use Godot v4.2.1.stable.official [b09f793f5]
#ResourceLoader doesn't retrieve the correct resource
4 messages · Page 1 of 1 (latest)
Why are you saving to res:// ? Shoulndt you be saving to user://?
at first I thought that saving to user would increase loading times. I planned to save to res during runtime and save to user for hard saves (like when quitting the game for example). But maybe i don't need to
ok fixed it, the variables in the resource scripts need to be export variables