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 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)); }