From 13412265e06842d7ab413ff1d1c9fd6d907261c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=CC=8Akan=20Sidenvall?= Date: Mon, 27 Jan 2025 21:09:31 +0100 Subject: [PATCH 1/2] FIX: - Fixed an issue where compiling Addressables with Input System package present would result in failed compilation due to `IInputAnalytic.TryGatherData` not being defined . --- Packages/com.unity.inputsystem/CHANGELOG.md | 2 +- Packages/com.unity.inputsystem/InputSystem/InputAnalytics.cs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index 3032159487..4db128afa5 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -15,7 +15,7 @@ however, it has to be formatted properly to pass verification tests. ### Fixed - Fixed an issue where the prompt to enable the InputSystem backends would interrupt the import of large assets. - Fixed Cut Mode for Action Maps and Actions to make renaming disabled. [ISXB-1155](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1155) - +- Fixed an issue where compiling Addressables with Input System package present would result in failed compilation due to `IInputAnalytic.TryGatherData` not being defined [ISXB-1203](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1203). ## [1.12.0] - 2025-01-15 diff --git a/Packages/com.unity.inputsystem/InputSystem/InputAnalytics.cs b/Packages/com.unity.inputsystem/InputSystem/InputAnalytics.cs index 49027e7e2a..d3b1dd0bfc 100644 --- a/Packages/com.unity.inputsystem/InputSystem/InputAnalytics.cs +++ b/Packages/com.unity.inputsystem/InputSystem/InputAnalytics.cs @@ -47,7 +47,10 @@ public interface IInputAnalytic { InputAnalyticInfo info { get; } // May be removed when only supporting 2023.2+ versions -#if !UNITY_2023_2_OR_NEWER +#if UNITY_EDITOR && UNITY_2023_2_OR_NEWER + // ISXB-1203 TryGatherData is defined by base. Note that UNITY_EDITOR is not defined when + // compiling addressables even when running in editor. +#else // Conditionally mimic UnityEngine.Analytics.IAnalytic bool TryGatherData(out IInputAnalyticData data, out Exception error); #endif // !UNITY_2023_2_OR_NEWER From 4e02346bda8ccd70e6415c9cf49a791efede7177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=CC=8Akan=20Sidenvall?= Date: Tue, 28 Jan 2025 14:22:27 +0100 Subject: [PATCH 2/2] Fixed comment and inverted #if based on review comments --- .../com.unity.inputsystem/InputSystem/InputAnalytics.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/InputAnalytics.cs b/Packages/com.unity.inputsystem/InputSystem/InputAnalytics.cs index d3b1dd0bfc..7593ebacf4 100644 --- a/Packages/com.unity.inputsystem/InputSystem/InputAnalytics.cs +++ b/Packages/com.unity.inputsystem/InputSystem/InputAnalytics.cs @@ -47,13 +47,10 @@ public interface IInputAnalytic { InputAnalyticInfo info { get; } // May be removed when only supporting 2023.2+ versions -#if UNITY_EDITOR && UNITY_2023_2_OR_NEWER - // ISXB-1203 TryGatherData is defined by base. Note that UNITY_EDITOR is not defined when - // compiling addressables even when running in editor. -#else +#if !UNITY_EDITOR || !UNITY_2023_2_OR_NEWER // Conditionally mimic UnityEngine.Analytics.IAnalytic bool TryGatherData(out IInputAnalyticData data, out Exception error); -#endif // !UNITY_2023_2_OR_NEWER +#endif // !UNITY_EDITOR || !UNITY_2023_2_OR_NEWER } public static void Initialize(InputManager manager)