diff --git a/Assets/Tests/InputSystem/CorePerformanceTests.cs b/Assets/Tests/InputSystem/CorePerformanceTests.cs index 3f4fd03599..65874f9dc7 100644 --- a/Assets/Tests/InputSystem/CorePerformanceTests.cs +++ b/Assets/Tests/InputSystem/CorePerformanceTests.cs @@ -123,7 +123,6 @@ public void Performance_ReadEveryKey() Measure.Method(() => { - int keyIndex = 0; foreach (var key in keyboard.allKeys) { key.ReadValue(); diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index aa5e19e05e..c321d77d63 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -10,7 +10,8 @@ however, it has to be formatted properly to pass verification tests. ## [Unreleased] - yyyy-mm-dd - +### Fixed +- Fixed warnings being generated on Unity 6.3 (beta). (ISXB-1718). ## [1.15.0] - 2025-10-03 diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastKeyboard.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastKeyboard.cs index dfbf339265..cd0bbb3e57 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastKeyboard.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastKeyboard.cs @@ -13,10 +13,12 @@ using UnityEngine.InputSystem.LowLevel; using UnityEngine.InputSystem.Utilities; -// Suppress warnings from local variables for control references -// that we don't end up using. +// Suppress warnings from local variables for control references that we don't end up using. #pragma warning disable CS0219 +// Suppress warnings from obsolete code when references from auto-generated code from the same code base. +#pragma warning disable CS0618 + namespace UnityEngine.InputSystem { internal partial class FastKeyboard : UnityEngine.InputSystem.Keyboard diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastMouse.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastMouse.cs index f0ff3624b6..c5ab918fb1 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastMouse.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastMouse.cs @@ -13,10 +13,12 @@ using UnityEngine.InputSystem.LowLevel; using UnityEngine.InputSystem.Utilities; -// Suppress warnings from local variables for control references -// that we don't end up using. +// Suppress warnings from local variables for control references that we don't end up using. #pragma warning disable CS0219 +// Suppress warnings from obsolete code when references from auto-generated code from the same code base. +#pragma warning disable CS0618 + namespace UnityEngine.InputSystem { internal partial class FastMouse : UnityEngine.InputSystem.Mouse diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastTouchscreen.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastTouchscreen.cs index f92586e3a2..06f018a61a 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastTouchscreen.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastTouchscreen.cs @@ -13,10 +13,12 @@ using UnityEngine.InputSystem.LowLevel; using UnityEngine.InputSystem.Utilities; -// Suppress warnings from local variables for control references -// that we don't end up using. +// Suppress warnings from local variables for control references that we don't end up using. #pragma warning disable CS0219 +// Suppress warnings from obsolete code when references from auto-generated code from the same code base. +#pragma warning disable CS0618 + namespace UnityEngine.InputSystem { internal partial class FastTouchscreen : UnityEngine.InputSystem.Touchscreen diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/InputActionEditorWindow.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/InputActionEditorWindow.cs index b0b457639f..1e88a026dc 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/InputActionEditorWindow.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/InputActionEditorWindow.cs @@ -42,9 +42,9 @@ static InputActionEditorWindow() InputActionAssetEditor.RegisterType(); } - // Unity 6.4 changed signature of OpenAsset, and now it accepts entity id instead of instance id. + // Unity 6.3 changed signature of OpenAsset, and now it accepts entity id instead of instance id. [OnOpenAsset] -#if UNITY_6000_4_OR_NEWER +#if UNITY_6000_3_OR_NEWER public static bool OpenAsset(EntityId entityId, int line) { if (!InputActionImporter.IsInputActionAssetPath(AssetDatabase.GetAssetPath(entityId))) diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/InputLayoutCodeGenerator.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/InputLayoutCodeGenerator.cs index bb3c339268..6f83561975 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/InputLayoutCodeGenerator.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/InputLayoutCodeGenerator.cs @@ -105,10 +105,12 @@ public static unsafe string GenerateCodeForDeviceLayout(string layoutName, strin writer.WriteLine("using UnityEngine.InputSystem.LowLevel;"); writer.WriteLine("using UnityEngine.InputSystem.Utilities;"); writer.WriteLine(""); - writer.WriteLine("// Suppress warnings from local variables for control references"); - writer.WriteLine("// that we don't end up using."); + writer.WriteLine("// Suppress warnings from local variables for control references that we don't end up using."); writer.WriteLine("#pragma warning disable CS0219"); writer.WriteLine(""); + writer.WriteLine("// Suppress warnings from obsolete code when references from auto-generated code from the same code base."); + writer.WriteLine("#pragma warning disable CS0618"); + writer.WriteLine(""); if (!string.IsNullOrEmpty(@namespace)) { writer.WriteLine("namespace " + @namespace); diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs index 90aac7d04d..6f08da5045 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs @@ -48,9 +48,9 @@ static InputActionsEditorWindow() m_Analytics ??= new InputActionsEditorSessionAnalytic( InputActionsEditorSessionAnalytic.Data.Kind.EditorWindow); - // Unity 6.4 changed signature of OpenAsset, and now it accepts entity id instead of instance id. + // Unity 6.3 changed signature of OpenAsset, and now it accepts entity id instead of instance id. [OnOpenAsset] -#if UNITY_6000_4_OR_NEWER +#if UNITY_6000_3_OR_NEWER public static bool OpenAsset(EntityId entityId, int line) { if (!InputActionImporter.IsInputActionAssetPath(AssetDatabase.GetAssetPath(entityId))) diff --git a/Packages/com.unity.inputsystem/InputSystem/InputSystem.cs b/Packages/com.unity.inputsystem/InputSystem/InputSystem.cs index 34d4462e22..968e19b43d 100644 --- a/Packages/com.unity.inputsystem/InputSystem/InputSystem.cs +++ b/Packages/com.unity.inputsystem/InputSystem/InputSystem.cs @@ -3695,10 +3695,10 @@ internal static void OnPlayModeChange(PlayModeStateChange change) } } - // We have this function to hide away instanceId -> entityId migration that happened in Unity 6.4 + // We have this function to hide away instanceId -> entityId migration that happened in Unity 6.3 public static bool HasNativeObject(Object obj) { -#if UNITY_6000_4_OR_NEWER +#if UNITY_6000_3_OR_NEWER return EditorUtility.EntityIdToObject(obj.GetEntityId()) != null; #else return EditorUtility.InstanceIDToObject(obj.GetInstanceID()) != null;