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

Circular reference when serializing Vectors #39

Open
SlimeQ opened this issue Aug 14, 2019 · 0 comments
Open

Circular reference when serializing Vectors #39

SlimeQ opened this issue Aug 14, 2019 · 0 comments

Comments

@SlimeQ
Copy link

SlimeQ commented Aug 14, 2019

When serializing a Unity vector such as Vector2 or Vector3, there is a circular reference on the normalized field.

This is not an issue in this other Json.Net implementation from the Unity store: https://assetstore.unity.com/packages/tools/input-management/json-net-for-unity-11347

I was hoping to be able to upgrade since that one has been unsupported for a long time and uses an old version of Json.Net, however this is a deal breaker. I'm not 100% sure what they did to make Vectors work, but the source code is available in that package. Probably the normalized field just needs to be explicitly omitted.

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

1 participant