From b9f9725cb9dbae57501a16e3dcea3607478b9436 Mon Sep 17 00:00:00 2001 From: tudor <7089284+tudddorrr@users.noreply.github.com> Date: Thu, 21 Nov 2024 18:23:43 +0000 Subject: [PATCH] upgrade to unity 6 --- .../SavesDemo/Scripts/MenuUIController.cs | 6 ++++-- Packages/com.trytalo.talo/Runtime/Talo.cs | 4 ++-- Packages/manifest.json | 5 +++-- Packages/packages-lock.json | 21 +++++++++++++++---- ProjectSettings/ProjectVersion.txt | 4 ++-- 5 files changed, 28 insertions(+), 12 deletions(-) diff --git a/Assets/Samples/SavesDemo/Scripts/MenuUIController.cs b/Assets/Samples/SavesDemo/Scripts/MenuUIController.cs index 5a31fbf..bfcd430 100644 --- a/Assets/Samples/SavesDemo/Scripts/MenuUIController.cs +++ b/Assets/Samples/SavesDemo/Scripts/MenuUIController.cs @@ -1,6 +1,7 @@ using UnityEngine; using TaloGameServices; using UnityEngine.UIElements; +using System; namespace TaloSavesDemo { @@ -49,12 +50,13 @@ public void SetContinueButtonVisibility(DisplayStyle style) private async void OnNewGameClick() { - foreach (var cube in FindObjectsOfType()) + foreach (var cube in FindObjectsByType(FindObjectsSortMode.None)) { cube.MoveToOriginalPos(); } - var save = await Talo.Saves.CreateSave($"Save {(Talo.Saves.Latest?.id ?? 0) + 1}"); + var date = DateTime.Now.ToString("ddd dd MMM HH:mm:ss"); + var save = await Talo.Saves.CreateSave($"Save created {date}"); Talo.Saves.ChooseSave(save.id); SendMessageUpwards("AddNewSaveToList", SendMessageOptions.RequireReceiver); diff --git a/Packages/com.trytalo.talo/Runtime/Talo.cs b/Packages/com.trytalo.talo/Runtime/Talo.cs index 2da7c15..0336f21 100644 --- a/Packages/com.trytalo.talo/Runtime/Talo.cs +++ b/Packages/com.trytalo.talo/Runtime/Talo.cs @@ -46,7 +46,7 @@ public static Player CurrentPlayer private static ContinuityManager _continuity; public static ContinuityManager Continuity => _continuity; - public static TaloSettings Settings => UnityEngine.Object.FindObjectOfType().settings; + public static TaloSettings Settings => UnityEngine.Object.FindFirstObjectByType().settings; private static LiveConfig _liveConfig; @@ -130,7 +130,7 @@ static Talo() } else { - tm = UnityEngine.Object.FindObjectOfType(); + tm = UnityEngine.Object.FindFirstObjectByType(); } _crypto = new CryptoManager(); diff --git a/Packages/manifest.json b/Packages/manifest.json index e9bfc1d..70a3b6f 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -1,8 +1,9 @@ { "dependencies": { "com.unity.ide.visualstudio": "2.0.22", - "com.unity.test-framework": "1.3.0", - "com.unity.ugui": "1.0.0", + "com.unity.test-framework": "1.4.5", + "com.unity.ugui": "2.0.0", + "com.unity.modules.accessibility": "1.0.0", "com.unity.modules.ai": "1.0.0", "com.unity.modules.androidjni": "1.0.0", "com.unity.modules.animation": "1.0.0", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index dd74001..6149a48 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -9,7 +9,7 @@ } }, "com.unity.ext.nunit": { - "version": "2.0.3", + "version": "2.0.5", "depth": 1, "source": "registry", "dependencies": {}, @@ -25,7 +25,7 @@ "url": "https://packages.unity.com" }, "com.unity.test-framework": { - "version": "1.3.0", + "version": "1.4.5", "depth": 0, "source": "registry", "dependencies": { @@ -36,7 +36,7 @@ "url": "https://packages.unity.com" }, "com.unity.ugui": { - "version": "1.0.0", + "version": "2.0.0", "depth": 0, "source": "builtin", "dependencies": { @@ -44,6 +44,12 @@ "com.unity.modules.imgui": "1.0.0" } }, + "com.unity.modules.accessibility": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, "com.unity.modules.ai": { "version": "1.0.0", "depth": 0, @@ -91,6 +97,12 @@ "com.unity.modules.animation": "1.0.0" } }, + "com.unity.modules.hierarchycore": { + "version": "1.0.0", + "depth": 1, + "source": "builtin", + "dependencies": {} + }, "com.unity.modules.imageconversion": { "version": "1.0.0", "depth": 0, @@ -179,7 +191,8 @@ "dependencies": { "com.unity.modules.ui": "1.0.0", "com.unity.modules.imgui": "1.0.0", - "com.unity.modules.jsonserialize": "1.0.0" + "com.unity.modules.jsonserialize": "1.0.0", + "com.unity.modules.hierarchycore": "1.0.0" } }, "com.unity.modules.umbra": { diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt index d971767..76dad2c 100644 --- a/ProjectSettings/ProjectVersion.txt +++ b/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 2022.3.28f1 -m_EditorVersionWithRevision: 2022.3.28f1 (6bae5ce6b222) +m_EditorVersion: 6000.0.28f1 +m_EditorVersionWithRevision: 6000.0.28f1 (f336aca0cab5)