diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index 70e3622787..c5c45b05e7 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -16,6 +16,7 @@ however, it has to be formatted properly to pass verification tests. - Fixed Action Maps contextual menu in Action Editor UI that occasionally displays unrelated items. - Fixed "MissingReferenceException" errors when closing an in-game dropdown field [ISXB-1081](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1081). - Fixed potential crash on Mac when using stale references to deleted InputDevice objects [ISXB-606](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-606). +- Fixed conditional compilation for non-editor analytics on platforms not enabling analytics. ### Changed - Renamed editor Resources directories to PackageResources to fix package validation warnings. diff --git a/Packages/com.unity.inputsystem/InputSystem/NativeInputRuntime.cs b/Packages/com.unity.inputsystem/InputSystem/NativeInputRuntime.cs index f82d5fa8b3..5c4c4a2734 100644 --- a/Packages/com.unity.inputsystem/InputSystem/NativeInputRuntime.cs +++ b/Packages/com.unity.inputsystem/InputSystem/NativeInputRuntime.cs @@ -393,7 +393,6 @@ public Action onProjectChange public void SendAnalytic(InputAnalytics.IInputAnalytic analytic) { - #if ENABLE_CLOUD_SERVICES_ANALYTICS #if (UNITY_EDITOR) #if (UNITY_2023_2_OR_NEWER) EditorAnalytics.SendAnalytic(analytic); @@ -405,7 +404,7 @@ public void SendAnalytic(InputAnalytics.IInputAnalytic analytic) EditorAnalytics.SendEventWithLimit(info.Name, analytic); #endif // UNITY_INPUT_SYSTEM_ENABLE_ANALYTICS || UNITY_2023_1_OR_NEWER #endif // UNITY_2023_2_OR_NEWER - #elif (UNITY_ANALYTICS) // Implicitly: !UNITY_EDITOR + #elif (ENABLE_CLOUD_SERVICES_ANALYTICS) // Implicitly: !UNITY_EDITOR && UNITY_ANALYTICS var info = analytic.info; Analytics.Analytics.RegisterEvent(info.Name, info.MaxEventsPerHour, info.MaxNumberOfElements, InputAnalytics.kVendorKey); if (analytic.TryGatherData(out var data, out var error)) @@ -413,7 +412,6 @@ public void SendAnalytic(InputAnalytics.IInputAnalytic analytic) else Debug.Log(error); // Non fatal #endif //UNITY_EDITOR - #endif //ENABLE_CLOUD_SERVICES_ANALYTICS } #endif // UNITY_ANALYTICS || UNITY_EDITOR