From dca40512ad2dd53d5819b84cd7dbbbe2cbabd830 Mon Sep 17 00:00:00 2001 From: Samuel Proulx Date: Wed, 4 Oct 2023 15:58:55 -0400 Subject: [PATCH 1/3] Post Release 6.0.0 (#61) --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45fe06f9..454fa7b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + ## [6.0.0] - 2023-10-04 ### Added From ed060470619adf739ba7775283eacf435d3453ef Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Tue, 10 Oct 2023 15:51:23 +0200 Subject: [PATCH 2/3] fix: Compilation error when Animation module is disabled and Newtonsoft JSON package installed. (#62) --- CHANGELOG.md | 3 +++ Runtime/Scripts/Newtonsoft/Schema/AnimationChannel.cs | 2 +- Runtime/Scripts/Newtonsoft/Schema/AnimationChannelTarget.cs | 2 +- Runtime/Scripts/Newtonsoft/Schema/AnimationSampler.cs | 2 +- Runtime/Scripts/Newtonsoft/Schema/GltfAnimation.cs | 2 +- Runtime/Scripts/Newtonsoft/glTFast.Newtonsoft.asmdef | 5 +++++ Tests/Runtime/Extensions.cs | 4 ++++ 7 files changed, 16 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 454fa7b0..2528f364 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed +- Compilation error when Animation module is disabled and Newtonsoft JSON package installed. + ## [6.0.0] - 2023-10-04 ### Added diff --git a/Runtime/Scripts/Newtonsoft/Schema/AnimationChannel.cs b/Runtime/Scripts/Newtonsoft/Schema/AnimationChannel.cs index fca45290..d5bbef7f 100644 --- a/Runtime/Scripts/Newtonsoft/Schema/AnimationChannel.cs +++ b/Runtime/Scripts/Newtonsoft/Schema/AnimationChannel.cs @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: 2023 Unity Technologies and the glTFast authors // SPDX-License-Identifier: Apache-2.0 -#if NEWTONSOFT_JSON +#if UNITY_ANIMATION && NEWTONSOFT_JSON using System.Collections.Generic; diff --git a/Runtime/Scripts/Newtonsoft/Schema/AnimationChannelTarget.cs b/Runtime/Scripts/Newtonsoft/Schema/AnimationChannelTarget.cs index 73a092fb..afcc71ad 100644 --- a/Runtime/Scripts/Newtonsoft/Schema/AnimationChannelTarget.cs +++ b/Runtime/Scripts/Newtonsoft/Schema/AnimationChannelTarget.cs @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: 2023 Unity Technologies and the glTFast authors // SPDX-License-Identifier: Apache-2.0 -#if NEWTONSOFT_JSON +#if UNITY_ANIMATION && NEWTONSOFT_JSON using System.Collections.Generic; diff --git a/Runtime/Scripts/Newtonsoft/Schema/AnimationSampler.cs b/Runtime/Scripts/Newtonsoft/Schema/AnimationSampler.cs index 007e0fb7..5c8400a8 100644 --- a/Runtime/Scripts/Newtonsoft/Schema/AnimationSampler.cs +++ b/Runtime/Scripts/Newtonsoft/Schema/AnimationSampler.cs @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: 2023 Unity Technologies and the glTFast authors // SPDX-License-Identifier: Apache-2.0 -#if NEWTONSOFT_JSON +#if UNITY_ANIMATION && NEWTONSOFT_JSON using System.Collections.Generic; diff --git a/Runtime/Scripts/Newtonsoft/Schema/GltfAnimation.cs b/Runtime/Scripts/Newtonsoft/Schema/GltfAnimation.cs index 42e274d1..0f8f6e83 100644 --- a/Runtime/Scripts/Newtonsoft/Schema/GltfAnimation.cs +++ b/Runtime/Scripts/Newtonsoft/Schema/GltfAnimation.cs @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: 2023 Unity Technologies and the glTFast authors // SPDX-License-Identifier: Apache-2.0 -#if NEWTONSOFT_JSON +#if UNITY_ANIMATION && NEWTONSOFT_JSON using System.Collections.Generic; diff --git a/Runtime/Scripts/Newtonsoft/glTFast.Newtonsoft.asmdef b/Runtime/Scripts/Newtonsoft/glTFast.Newtonsoft.asmdef index 4254926c..e615c17d 100644 --- a/Runtime/Scripts/Newtonsoft/glTFast.Newtonsoft.asmdef +++ b/Runtime/Scripts/Newtonsoft/glTFast.Newtonsoft.asmdef @@ -12,6 +12,11 @@ "autoReferenced": false, "defineConstraints": [], "versionDefines": [ + { + "name": "com.unity.modules.animation", + "expression": "1.0.0", + "define": "UNITY_ANIMATION" + }, { "name": "com.unity.nuget.newtonsoft-json", "expression": "", diff --git a/Tests/Runtime/Extensions.cs b/Tests/Runtime/Extensions.cs index 02215f37..6ffefd89 100644 --- a/Tests/Runtime/Extensions.cs +++ b/Tests/Runtime/Extensions.cs @@ -378,6 +378,7 @@ public void CustomExtensionEverywhere() CertifyCustomExtensions(gltf.accessors[0].sparse.values.extensions); CertifyCustomExtras(gltf.accessors[0].sparse.values.extras); +#if UNITY_ANIMATION CertifyCustomData(gltf.animations[0], 43); CertifyCustomExtensions(gltf.animations[0].extensions); CertifyCustomExtras(gltf.animations[0].extras); @@ -393,6 +394,7 @@ public void CustomExtensionEverywhere() CertifyCustomData(gltf.animations[0].samplers[0], 431); CertifyCustomExtensions(gltf.animations[0].samplers[0].extensions); CertifyCustomExtras(gltf.animations[0].samplers[0].extras); +#endif CertifyCustomData(gltf.asset, 44); CertifyCustomExtensions(gltf.asset.extensions); @@ -570,8 +572,10 @@ public void CustomExtensionNowhere() Assert.IsNull(gltf.accessors[0].extras); Assert.IsNull(gltf.accessors[0].extensions); +#if UNITY_ANIMATION Assert.IsNull(gltf.animations[0].extras); Assert.IsNull(gltf.animations[0].extensions); +#endif Assert.IsNull(gltf.asset.extras); Assert.IsNull(gltf.asset.extensions); From aa4b43f71db6e1b8d08b0a06b7b138c820b7a540 Mon Sep 17 00:00:00 2001 From: Aurora Huang Date: Wed, 11 Oct 2023 15:47:23 -0400 Subject: [PATCH 3/3] Release 6.0.1 (#63) --- CHANGELOG.md | 2 +- Runtime/Scripts/Export/Constants.cs | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2528f364..1e480002 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [6.0.1] - 2023-10-11 ### Fixed - Compilation error when Animation module is disabled and Newtonsoft JSON package installed. diff --git a/Runtime/Scripts/Export/Constants.cs b/Runtime/Scripts/Export/Constants.cs index f19fd866..7393b836 100644 --- a/Runtime/Scripts/Export/Constants.cs +++ b/Runtime/Scripts/Export/Constants.cs @@ -7,7 +7,7 @@ namespace GLTFast.Export { static class Constants { - public const string version = "6.0.0"; + public const string version = "6.0.1"; internal const string mimeTypePNG = "image/png"; internal const string mimeTypeJPG = "image/jpeg"; diff --git a/package.json b/package.json index 59d0fca8..c37d6cda 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "com.unity.cloud.gltfast", - "version": "6.0.0", + "version": "6.0.1", "displayName": "Unity glTFast", "description": "Use glTFast to import and export glTF 3D files efficiently at runtime or in the Editor", "unity": "2020.3",