Newtonsoft.Json For Unity.Converters Versions Save

Converters of common Unity types for Newtonsoft.Json. Goes hand in hand with jilleJr/Newtonsoft.Json-for-Unity

1.6.3

3 months ago

Changes (since v1.6.2)

  • Fixed converter lookups collisions when multiple assemblies converters with the same name, as it was not resolving assemblies in an exact way nor deterministic order:

    • Added assembly name field to ConverterConfig for each converter.

    • Changed TypeCache to sort assemblies based on FullName and some heuristics.

    • Changed TypeCache to lookup type in correct assembly, based on the assembly's name.

    Thanks @Erifirin for the pull request (#90)

1.6.2

4 months ago

Changes (since v1.6.1)

  • Fixed typo in the new Unity.Mathematics QuaternionConverter's namespace: from Newtonsoft.Json.UnityConverters.Math.QuaternionConverter to Newtonsoft.Json.UnityConverters.Mathematics.QuaternionConverter (MathMathematics). (#87)

  • Fixed compilation error when using Unity.Mathematics with Newtonsoft.JSON v10. (#87)

1.6.1

5 months ago

Changes (since v1.6.0)

  • Fixed UnityConvertersConfigEditor scriptable object asset throwing error after recompiling scripts in Unity 2022.3.0 when selected and shown in inspector. (#82)

    Thanks @EpsilonD3lta for the implementation (#83)

1.6.0

5 months ago

Changes (since v1.5.1)

  • Added converters for Unity.Mathematics. This includes all the float2, double3, int4, bool4, and similar types. (#80)

    There are no custom converters for the matrix types (float2x2, float2x3, etc), as they currently work out-of-the-box.

  • Added ResolutionConverter to be able to read JSON from older Unity versions. (#79)

  • Fixed compilation errors when targeting .NET Standard 2.1. (#79)

  • Fixed converter types taking long time to load, sometimes causing lag spikes each time assembly got reloaded (especially when entering play-mode).

    The issue was that this package tries to find all converters by looping through all types in all assemblies.

    You should see better performance now, as we are using more optimized code paths and making use of Unity's TypeCache.

    If your project still suffers from big lag spikes, then you can opt-out completely of the "auto type scanning" code via the settings found at "Edit > Json.NET converters settings..." (#79)

1.5.1

1 year ago

Changes (since v1.5.0)

  • Fixed converters being stripped when Managed Stripping Level is set to anything higher than "minimal", by adding [Preserve] attribute to the entire assemblies. (#73)

1.5.0

1 year ago

Changes

  • Added support for UnityEngine.AddressableAssets.AssetReferenceT<T>, in addition to the existing support for the non-generic AssetReference version introduced in v1.4.0.

    Thanks @kyverr for the implementation (#71)

1.4.0

2 years ago

Changes

  • Added support for UnityEngine.AddressableAssets.AssetReference. The new AssetReferenceConverter is only included in the build if your project contains the com.unity.addressables package. (#66, #67)

    This automatic inclusion relies on AssemblyDefinition version defines, which was introduced in Unity 2019.1.x. To enable the AssetReferenceConverter in earlier versions of Unity, please add HAVE_MODULE_ADDRESSABLES to your project's "Scripting Define Symbols" found in the "Project Settings" -> "Player" -> "Other Settings" panel.

1.3.0

2 years ago

Changes

  • Changed the following modules to be automatically excluded from compilation if they are not used in the project:

    • com.unity.modules.ai via new define HAVE_MODULE_AI
    • com.unity.modules.physics via new define HAVE_MODULE_PHYSICS
    • com.unity.modules.physics2d via new define HAVE_MODULE_PHYSICS2D

    This is active starting with Unity 2019.1.x. The regarded modules are always active in prior Unity versions.

    Thanks @SolidAlloy for the implementation (#60)

1.2.0

2 years ago

Changes

  • Changed UnityConverterInitializer from internal to public. (#58)

1.1.1

3 years ago

Changes

  • Fixed Newtonsoft.Json converters (ex: StringEnumConverter & VersionConverter) not being loaded even if you had then enabled in the Newtonsoft.Json-for-Unity.Converters config. (#55)