Skip to content

Circular reference when serializing Vectors #39

Description

@SlimeQ

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions