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

[FEATURE REQUEST] Support for storing & loading Vector2/Vector2i as stringValues in documents #447

Open
xzirox opened this issue Nov 21, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@xzirox
Copy link

xzirox commented Nov 21, 2024

Is your feature request related to a problem? Please describe.
Trying to store a Vector2 or Vector2i value to Firestore currently returns an error:
[Firebase Error] >> Action in error was: 2 (UPDATE DOCUMENT)

Describe the solution you'd like
I'd like it to instead be stored as a stringValue and then loaded back as a Vector2 or Vector2i when loaded from the document.

Describe alternatives you've considered
The only alternatives is to manually convert the data to something else before saving it, when it could instead be supported as a built-in type.

@xzirox
Copy link
Author

xzirox commented Nov 21, 2024

Added support for it.

I should note that my use-case for this is storing player positions in Firestore upon logout and then loading it next time the player goes online.

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

No branches or pull requests

1 participant