From 5d43ced8cc38f9d7b528b6c180688595d42003a9 Mon Sep 17 00:00:00 2001 From: Makihiro Date: Sun, 31 Dec 2023 15:47:43 +0900 Subject: [PATCH 1/5] Update Unity to 2021.3.32f1 --- Packages/manifest.json | 4 ++-- Packages/packages-lock.json | 4 ++-- ProjectSettings/ProjectVersion.txt | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Packages/manifest.json b/Packages/manifest.json index c480095..33771c2 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -1,7 +1,7 @@ { "dependencies": { - "com.unity.ide.rider": "3.0.24", - "com.unity.ide.visualstudio": "2.0.18", + "com.unity.ide.rider": "3.0.25", + "com.unity.ide.visualstudio": "2.0.21", "com.unity.ide.vscode": "1.2.5", "com.unity.test-framework": "1.1.33", "com.unity.modules.ai": "1.0.0", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 0345b8a..6825782 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -8,7 +8,7 @@ "url": "https://packages.unity.com" }, "com.unity.ide.rider": { - "version": "3.0.24", + "version": "3.0.25", "depth": 0, "source": "registry", "dependencies": { @@ -17,7 +17,7 @@ "url": "https://packages.unity.com" }, "com.unity.ide.visualstudio": { - "version": "2.0.18", + "version": "2.0.21", "depth": 0, "source": "registry", "dependencies": { diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt index db3863a..265377b 100644 --- a/ProjectSettings/ProjectVersion.txt +++ b/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 2021.3.29f1 -m_EditorVersionWithRevision: 2021.3.29f1 (204d6dc9ae1c) +m_EditorVersion: 2021.3.32f1 +m_EditorVersionWithRevision: 2021.3.32f1 (3b9dae9532f5) From cdbc2daf213bcef493a690de8a86cbcb6729995b Mon Sep 17 00:00:00 2001 From: Makihiro Date: Sun, 31 Dec 2023 16:00:13 +0900 Subject: [PATCH 2/5] Restore values from json on create new managed reference --- .../Editor/ManagedReferenceUtility.cs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/Assets/MackySoft/MackySoft.SerializeReferenceExtensions/Editor/ManagedReferenceUtility.cs b/Assets/MackySoft/MackySoft.SerializeReferenceExtensions/Editor/ManagedReferenceUtility.cs index bec2c47..5cc7223 100644 --- a/Assets/MackySoft/MackySoft.SerializeReferenceExtensions/Editor/ManagedReferenceUtility.cs +++ b/Assets/MackySoft/MackySoft.SerializeReferenceExtensions/Editor/ManagedReferenceUtility.cs @@ -2,14 +2,27 @@ using System; using System.Reflection; using UnityEditor; +using UnityEngine; namespace MackySoft.SerializeReferenceExtensions.Editor { public static class ManagedReferenceUtility { public static object SetManagedReference (this SerializedProperty property,Type type) { - object obj = (type != null) ? Activator.CreateInstance(type) : null; - property.managedReferenceValue = obj; - return obj; + object result; + if (property.managedReferenceValue != null) + { + // Restore an previous values from json. + string json = JsonUtility.ToJson(property.managedReferenceValue); + result = JsonUtility.FromJson(json, type); + } + else + { + result = (type != null) ? Activator.CreateInstance(type) : null; + } + + property.managedReferenceValue = result; + return result; + } public static Type GetType (string typeName) { From 360c800b2509c28a83c9acc7e68bef2276e506af Mon Sep 17 00:00:00 2001 From: Makihiro Date: Sun, 31 Dec 2023 16:03:32 +0900 Subject: [PATCH 3/5] Revert "Update Unity to 2021.3.32f1" This reverts commit 5d43ced8cc38f9d7b528b6c180688595d42003a9. --- Packages/manifest.json | 4 ++-- Packages/packages-lock.json | 4 ++-- ProjectSettings/ProjectVersion.txt | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Packages/manifest.json b/Packages/manifest.json index 33771c2..c480095 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -1,7 +1,7 @@ { "dependencies": { - "com.unity.ide.rider": "3.0.25", - "com.unity.ide.visualstudio": "2.0.21", + "com.unity.ide.rider": "3.0.24", + "com.unity.ide.visualstudio": "2.0.18", "com.unity.ide.vscode": "1.2.5", "com.unity.test-framework": "1.1.33", "com.unity.modules.ai": "1.0.0", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 6825782..0345b8a 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -8,7 +8,7 @@ "url": "https://packages.unity.com" }, "com.unity.ide.rider": { - "version": "3.0.25", + "version": "3.0.24", "depth": 0, "source": "registry", "dependencies": { @@ -17,7 +17,7 @@ "url": "https://packages.unity.com" }, "com.unity.ide.visualstudio": { - "version": "2.0.21", + "version": "2.0.18", "depth": 0, "source": "registry", "dependencies": { diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt index 265377b..db3863a 100644 --- a/ProjectSettings/ProjectVersion.txt +++ b/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 2021.3.32f1 -m_EditorVersionWithRevision: 2021.3.32f1 (3b9dae9532f5) +m_EditorVersion: 2021.3.29f1 +m_EditorVersionWithRevision: 2021.3.29f1 (204d6dc9ae1c) From 65b0076c954a1edbd845249db418175d6765ce14 Mon Sep 17 00:00:00 2001 From: Makihiro Date: Sun, 31 Dec 2023 16:46:11 +0900 Subject: [PATCH 4/5] Update package.yaml --- .github/workflows/package.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yaml index f0238d2..3776e8e 100644 --- a/.github/workflows/package.yaml +++ b/.github/workflows/package.yaml @@ -28,7 +28,11 @@ jobs: # Build - name: Build .unitypackage - uses: game-ci/unity-builder@v2 + uses: game-ci/unity-builder@v4 + env: + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} + UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} with: unityVersion: 2020.3.8f1 buildMethod: MackySoft.PackageTools.Editor.UnityPackageExporter.Export From 59da3868b12b9a3009948db21f9764bc68c820dd Mon Sep 17 00:00:00 2001 From: Makihiro Date: Sun, 31 Dec 2023 16:55:44 +0900 Subject: [PATCH 5/5] Update package.yaml --- .github/workflows/package.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yaml index 3776e8e..5284801 100644 --- a/.github/workflows/package.yaml +++ b/.github/workflows/package.yaml @@ -34,7 +34,7 @@ jobs: UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} with: - unityVersion: 2020.3.8f1 + unityVersion: 2021.3.29f1 buildMethod: MackySoft.PackageTools.Editor.UnityPackageExporter.Export # Upload