Skip to content
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

Saving subresource automatically #12

Open
grzegorz-taramina opened this issue Nov 21, 2024 · 1 comment
Open

Saving subresource automatically #12

grzegorz-taramina opened this issue Nov 21, 2024 · 1 comment

Comments

@grzegorz-taramina
Copy link

grzegorz-taramina commented Nov 21, 2024

Hey,
I have a question about the design of the library.
Why it doesn't save nested field resources automatically? It saves resources inside array but not single fields.

I have this class:

class_name GameSave extends Resource

var _active_slot_id		: OptionR
var _slots			: Array[GameSlotSave]

OptionR and GameSlotSave are resources. The array is being stored correctly but OptionR is saved as "_active_slot_id": "<Resource#-9223369771041419952>"

I know I can set it manually by using set_var("game_save:active_slot_id", some_variant) but I don't see any reason why resource cannot be serialized properly. Am I missing something?

@grzegorz-taramina grzegorz-taramina changed the title Automatically saving subresource Saving subresource automatically Nov 21, 2024
@AdamKormos
Copy link
Owner

Hello, sorry for the late response. I can't seem to reproduce this, as the test save resources we use also have both just a resource and a resource array, and those are saved properly, automatically.
If you send me your project, I'm happy to investigate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants