From f230fcd10de4cb08d32d8777062117d98fc4ea12 Mon Sep 17 00:00:00 2001 From: Thomas Tu Date: Wed, 25 Feb 2026 13:04:37 -0500 Subject: [PATCH 1/4] Fix warnings due to changes on Unity 6.5 --- Editor/EditorCore/EditorUtility.cs | 4 ++++ Tests/Editor/Editor/MeshSyncTests.cs | 4 +++- Tests/Editor/Undo/TestUndo.cs | 9 ++++++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Editor/EditorCore/EditorUtility.cs b/Editor/EditorCore/EditorUtility.cs index bbf1419a5..e2a0dda32 100644 --- a/Editor/EditorCore/EditorUtility.cs +++ b/Editor/EditorCore/EditorUtility.cs @@ -453,7 +453,11 @@ public static void SetGizmoIconEnabled(Type script, bool enabled) internal static T[] FindObjectsByType() where T : UObject { +#if UNITY_6000_5_OR_NEWER + return UObject.FindObjectsByType(); +#else return UObject.FindObjectsByType(FindObjectsSortMode.None); +#endif } internal static string GetActiveSceneAssetsPath() diff --git a/Tests/Editor/Editor/MeshSyncTests.cs b/Tests/Editor/Editor/MeshSyncTests.cs index 3a9d53760..0d9b64914 100644 --- a/Tests/Editor/Editor/MeshSyncTests.cs +++ b/Tests/Editor/Editor/MeshSyncTests.cs @@ -48,7 +48,9 @@ static ulong GetRawId(Object obj) { var id = obj.GetObjectId(); -#if UNITY_6000_4_OR_NEWER +#if UNITY_6000_5_OR_NEWER + return EntityId.ToULong(id); +#elif UNITY_6000_4 return id.GetRawData(); #else return (ulong)id; diff --git a/Tests/Editor/Undo/TestUndo.cs b/Tests/Editor/Undo/TestUndo.cs index b3b938231..76c70b8aa 100644 --- a/Tests/Editor/Undo/TestUndo.cs +++ b/Tests/Editor/Undo/TestUndo.cs @@ -53,12 +53,19 @@ public static void CreateShape_UndoDoesRemoveTheGameObject() instance.PerformAction(); +#if UNITY_6000_5_OR_NEWER + var shapes = GameObject.FindObjectsByType(); +#else var shapes = GameObject.FindObjectsByType(FindObjectsSortMode.None); +#endif Assume.That(shapes.Length, Is.EqualTo(1)); Undo.PerformUndo(); - +#if UNITY_6000_5_OR_NEWER + shapes = GameObject.FindObjectsByType(); +#else shapes = GameObject.FindObjectsByType(FindObjectsSortMode.None); +#endif Assert.That(shapes.Length, Is.EqualTo(0)); } From c2c3a75b20d1b4dc4d4af423ff566663888af463 Mon Sep 17 00:00:00 2001 From: Thomas Tu Date: Wed, 25 Feb 2026 15:15:44 -0500 Subject: [PATCH 2/4] Update Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a8789c87..300253881 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed - [UUM-133861] Fixed "Look rotation viewing vector is zero" log being spammed when holding shift while using a create tool such as Create Sprite. +- Fixed warnings related to obsolete API calls with Unity 6.5. ## [6.0.9] - 2026-01-30 From 0727d70dd1a253e43d4bb381eb4e9a7d0a819442 Mon Sep 17 00:00:00 2001 From: Thomas Tu Date: Tue, 3 Mar 2026 13:28:58 -0500 Subject: [PATCH 3/4] Address PR comments --- Editor/EditorCore/EditorUtility.cs | 2 +- Tests/Editor/Editor/MeshSyncTests.cs | 4 +--- Tests/Editor/Undo/TestUndo.cs | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Editor/EditorCore/EditorUtility.cs b/Editor/EditorCore/EditorUtility.cs index e2a0dda32..ea192dd73 100644 --- a/Editor/EditorCore/EditorUtility.cs +++ b/Editor/EditorCore/EditorUtility.cs @@ -453,7 +453,7 @@ public static void SetGizmoIconEnabled(Type script, bool enabled) internal static T[] FindObjectsByType() where T : UObject { -#if UNITY_6000_5_OR_NEWER +#if UNITY_6000_4_OR_NEWER return UObject.FindObjectsByType(); #else return UObject.FindObjectsByType(FindObjectsSortMode.None); diff --git a/Tests/Editor/Editor/MeshSyncTests.cs b/Tests/Editor/Editor/MeshSyncTests.cs index 0d9b64914..c3a4a1a6d 100644 --- a/Tests/Editor/Editor/MeshSyncTests.cs +++ b/Tests/Editor/Editor/MeshSyncTests.cs @@ -48,10 +48,8 @@ static ulong GetRawId(Object obj) { var id = obj.GetObjectId(); -#if UNITY_6000_5_OR_NEWER +#if UNITY_6000_4_OR_NEWER return EntityId.ToULong(id); -#elif UNITY_6000_4 - return id.GetRawData(); #else return (ulong)id; #endif diff --git a/Tests/Editor/Undo/TestUndo.cs b/Tests/Editor/Undo/TestUndo.cs index 76c70b8aa..994f9f5ad 100644 --- a/Tests/Editor/Undo/TestUndo.cs +++ b/Tests/Editor/Undo/TestUndo.cs @@ -53,7 +53,7 @@ public static void CreateShape_UndoDoesRemoveTheGameObject() instance.PerformAction(); -#if UNITY_6000_5_OR_NEWER +#if UNITY_6000_4_OR_NEWER var shapes = GameObject.FindObjectsByType(); #else var shapes = GameObject.FindObjectsByType(FindObjectsSortMode.None); @@ -61,7 +61,7 @@ public static void CreateShape_UndoDoesRemoveTheGameObject() Assume.That(shapes.Length, Is.EqualTo(1)); Undo.PerformUndo(); -#if UNITY_6000_5_OR_NEWER +#if UNITY_6000_4_OR_NEWER shapes = GameObject.FindObjectsByType(); #else shapes = GameObject.FindObjectsByType(FindObjectsSortMode.None); From d589cbfebe1ccb17672d7a2ac38fe4461a17fcff Mon Sep 17 00:00:00 2001 From: Thomas Tu Date: Tue, 3 Mar 2026 13:32:04 -0500 Subject: [PATCH 4/4] Update Changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 300253881..4d5186fc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed - [UUM-133861] Fixed "Look rotation viewing vector is zero" log being spammed when holding shift while using a create tool such as Create Sprite. -- Fixed warnings related to obsolete API calls with Unity 6.5. +- Fixed warnings related to obsolete API calls with Unity 6.4 and onwards. ## [6.0.9] - 2026-01-30