From 3a2a4c2a1a67a44539902e129065a7d64030d031 Mon Sep 17 00:00:00 2001 From: Paulius Dervinis <54306142+Pauliusd01@users.noreply.github.com> Date: Thu, 26 Sep 2024 11:28:20 +0300 Subject: [PATCH 01/14] CHANGE: Bump version to 1.11.2 (#2014) --- Assets/Samples/InGameHints/InGameHintsActions.cs | 2 +- Assets/Samples/SimpleDemo/SimpleControls.cs | 2 +- Assets/Tests/InputSystem/InputActionCodeGeneratorActions.cs | 2 +- Packages/com.unity.inputsystem/CHANGELOG.md | 2 ++ Packages/com.unity.inputsystem/InputSystem/AssemblyInfo.cs | 2 +- .../InputSystem/Devices/Precompiled/FastKeyboard.cs | 2 +- .../InputSystem/Devices/Precompiled/FastMouse.cs | 2 +- .../InputSystem/Devices/Precompiled/FastTouchscreen.cs | 2 +- .../com.unity.inputsystem/Tests/TestFixture/AssemblyInfo.cs | 2 +- Packages/com.unity.inputsystem/package.json | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Assets/Samples/InGameHints/InGameHintsActions.cs b/Assets/Samples/InGameHints/InGameHintsActions.cs index fecfd7aa30..50a98c9576 100644 --- a/Assets/Samples/InGameHints/InGameHintsActions.cs +++ b/Assets/Samples/InGameHints/InGameHintsActions.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator -// version 1.11.1 +// version 1.11.2 // from Assets/Samples/InGameHints/InGameHintsActions.inputactions // // Changes to this file may cause incorrect behavior and will be lost if diff --git a/Assets/Samples/SimpleDemo/SimpleControls.cs b/Assets/Samples/SimpleDemo/SimpleControls.cs index d8421f7186..e37e57109c 100644 --- a/Assets/Samples/SimpleDemo/SimpleControls.cs +++ b/Assets/Samples/SimpleDemo/SimpleControls.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator -// version 1.11.1 +// version 1.11.2 // from Assets/Samples/SimpleDemo/SimpleControls.inputactions // // Changes to this file may cause incorrect behavior and will be lost if diff --git a/Assets/Tests/InputSystem/InputActionCodeGeneratorActions.cs b/Assets/Tests/InputSystem/InputActionCodeGeneratorActions.cs index d4bd6c4480..a4dd4c564f 100644 --- a/Assets/Tests/InputSystem/InputActionCodeGeneratorActions.cs +++ b/Assets/Tests/InputSystem/InputActionCodeGeneratorActions.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator -// version 1.11.1 +// version 1.11.2 // from Assets/Tests/InputSystem/InputActionCodeGeneratorActions.inputactions // // Changes to this file may cause incorrect behavior and will be lost if diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index 28a0eb9865..785f36c0c3 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. Due to package verification, the latest version below is the unpublished version and the date is meaningless. however, it has to be formatted properly to pass verification tests. +## [Unreleased] - yyyy-mm-dd + ## [1.11.1] - 2024-09-26 ### Fixed diff --git a/Packages/com.unity.inputsystem/InputSystem/AssemblyInfo.cs b/Packages/com.unity.inputsystem/InputSystem/AssemblyInfo.cs index 8a21a0c5ac..ace16cbfa2 100644 --- a/Packages/com.unity.inputsystem/InputSystem/AssemblyInfo.cs +++ b/Packages/com.unity.inputsystem/InputSystem/AssemblyInfo.cs @@ -16,7 +16,7 @@ public static partial class InputSystem // Keep this in sync with "Packages/com.unity.inputsystem/package.json". // NOTE: Unfortunately, System.Version doesn't use semantic versioning so we can't include // "-preview" suffixes here. - internal const string kAssemblyVersion = "1.11.1"; + internal const string kAssemblyVersion = "1.11.2"; internal const string kDocUrl = "https://docs.unity3d.com/Packages/com.unity.inputsystem@1.11"; } } diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastKeyboard.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastKeyboard.cs index b9ff78c2f2..00255de756 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastKeyboard.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastKeyboard.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was auto-generated by com.unity.inputsystem:InputLayoutCodeGenerator -// version 1.11.1 +// version 1.11.2 // from "Keyboard" layout // // Changes to this file may cause incorrect behavior and will be lost if diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastMouse.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastMouse.cs index f16a7a48ce..7026b23e70 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastMouse.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastMouse.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was auto-generated by com.unity.inputsystem:InputLayoutCodeGenerator -// version 1.11.1 +// version 1.11.2 // from "Mouse" layout // // Changes to this file may cause incorrect behavior and will be lost if diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastTouchscreen.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastTouchscreen.cs index 443ee4092d..3b75a754e5 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastTouchscreen.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastTouchscreen.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was auto-generated by com.unity.inputsystem:InputLayoutCodeGenerator -// version 1.11.1 +// version 1.11.2 // from "Touchscreen" layout // // Changes to this file may cause incorrect behavior and will be lost if diff --git a/Packages/com.unity.inputsystem/Tests/TestFixture/AssemblyInfo.cs b/Packages/com.unity.inputsystem/Tests/TestFixture/AssemblyInfo.cs index cbaf3531d6..0c4d5b437c 100644 --- a/Packages/com.unity.inputsystem/Tests/TestFixture/AssemblyInfo.cs +++ b/Packages/com.unity.inputsystem/Tests/TestFixture/AssemblyInfo.cs @@ -4,7 +4,7 @@ // Keep this in sync with "Packages/com.unity.inputsystem/package.json". // NOTE: Unfortunately, System.Version doesn't use semantic versioning so we can't include // "-preview" suffixes here. -[assembly: AssemblyVersion("1.11.1")] +[assembly: AssemblyVersion("1.11.2")] [assembly: InternalsVisibleTo("Unity.InputSystem.Tests.Editor")] [assembly: InternalsVisibleTo("Unity.InputSystem.Tests")] [assembly: InternalsVisibleTo("Unity.InputSystem.IntegrationTests")] diff --git a/Packages/com.unity.inputsystem/package.json b/Packages/com.unity.inputsystem/package.json index 3645582515..d0838bc8b4 100755 --- a/Packages/com.unity.inputsystem/package.json +++ b/Packages/com.unity.inputsystem/package.json @@ -1,7 +1,7 @@ { "name": "com.unity.inputsystem", "displayName": "Input System", - "version": "1.11.1", + "version": "1.11.2", "unity": "2019.4", "description": "A new input system which can be used as a more extensible and customizable alternative to Unity's classic input system in UnityEngine.Input.", "keywords": [ From 026cdcc6a8b66d90edf22359d173ed55983504b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kan=20Sidenvall?= Date: Fri, 27 Sep 2024 12:05:22 +0200 Subject: [PATCH 02/14] NEW: ISX-2099 InputAction code-setup (authoring) analytics (#2003) * Added code setup analytics logged with new analytic event "input_exit_playmode". --- .../Tests/InputSystem/CoreTests_Analytics.cs | 49 ++++++ Packages/com.unity.inputsystem/CHANGELOG.md | 1 + .../Actions/InputActionSetupExtensions.cs | 77 ++++++++ .../InputActionsEditorSessionAnalytic.cs | 2 +- .../Editor/Analytics/InputBuildAnalytic.cs | 2 +- .../Analytics/InputComponentEditorAnalytic.cs | 4 +- .../Editor/Analytics/InputEditorAnalytics.cs | 2 +- .../Analytics/InputExitPlayModeAnalytic.cs | 165 ++++++++++++++++++ .../InputExitPlayModeAnalytic.cs.meta | 3 + .../Analytics/OnScreenStickEditorAnalytic.cs | 4 +- .../Analytics/PlayerInputEditorAnalytic.cs | 2 +- .../PlayerInputManagerEditorAnalytic.cs | 2 +- .../VirtualMouseInputEditorAnalytic.cs | 2 +- .../Plugins/OnScreen/OnScreenStick.cs | 12 ++ .../Plugins/XR/TrackedPoseDriver.cs | 21 ++- 15 files changed, 332 insertions(+), 16 deletions(-) create mode 100644 Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputExitPlayModeAnalytic.cs create mode 100644 Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputExitPlayModeAnalytic.cs.meta diff --git a/Assets/Tests/InputSystem/CoreTests_Analytics.cs b/Assets/Tests/InputSystem/CoreTests_Analytics.cs index ef86b4fa64..e9892b3064 100644 --- a/Assets/Tests/InputSystem/CoreTests_Analytics.cs +++ b/Assets/Tests/InputSystem/CoreTests_Analytics.cs @@ -663,6 +663,55 @@ public void Analytics_ShouldReportPlayerInputManagerData() } } + [Test] + [Category("Analytics")] + public void Analytics_ShouldReportCodeAuthoringAnalytic() + { + CollectAnalytics(InputExitPlayModeAnalytic.kEventName); + + // NOTE: We do not want to trigger entering/exiting play-mode for this small data-sanity check + // so just stick to triggering it explicitly. A better test would have been an editor test + // going in and out of play-mode for real but not clear if this is really possible. + + // Pretend we are entering play-mode + InputExitPlayModeAnalytic.OnPlayModeStateChange(PlayModeStateChange.ExitingEditMode); + InputExitPlayModeAnalytic.OnPlayModeStateChange(PlayModeStateChange.EnteredPlayMode); + + // Assert no data received + Assert.That(sentAnalyticsEvents.Count, Is.EqualTo(0)); + + // Pretend we are exiting play-mode + InputExitPlayModeAnalytic.OnPlayModeStateChange(PlayModeStateChange.ExitingPlayMode); + InputExitPlayModeAnalytic.OnPlayModeStateChange(PlayModeStateChange.EnteredEditMode); + + // Assert: Data received + Assert.That(sentAnalyticsEvents.Count, Is.EqualTo(1)); + Assert.That(sentAnalyticsEvents[0].name, Is.EqualTo(InputExitPlayModeAnalytic.kEventName)); + Assert.That(sentAnalyticsEvents[0].data, Is.TypeOf()); + + var data0 = (InputExitPlayModeAnalytic.Data)sentAnalyticsEvents[0].data; + Assert.That(data0.uses_code_authoring, Is.False); + + // Pretend we are entering play-mode + InputExitPlayModeAnalytic.OnPlayModeStateChange(PlayModeStateChange.ExitingEditMode); + InputExitPlayModeAnalytic.OnPlayModeStateChange(PlayModeStateChange.EnteredPlayMode); + + var action = new InputAction("Dance"); + action.AddBinding("/Space"); + + // Pretend we are exiting play-mode + InputExitPlayModeAnalytic.OnPlayModeStateChange(PlayModeStateChange.ExitingPlayMode); + InputExitPlayModeAnalytic.OnPlayModeStateChange(PlayModeStateChange.EnteredEditMode); + + // Assert: Data received + Assert.That(sentAnalyticsEvents.Count, Is.EqualTo(2)); + Assert.That(sentAnalyticsEvents[1].name, Is.EqualTo(InputExitPlayModeAnalytic.kEventName)); + Assert.That(sentAnalyticsEvents[1].data, Is.TypeOf()); + + var data1 = (InputExitPlayModeAnalytic.Data)sentAnalyticsEvents[1].data; + Assert.That(data1.uses_code_authoring, Is.True); + } + #if UNITY_INPUT_SYSTEM_ENABLE_UI [Test] [Category("Analytics")] diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index 785f36c0c3..5a555b2373 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -47,6 +47,7 @@ however, it has to be formatted properly to pass verification tests. - Added tests for Input Action Editor UI for managing action maps (List, create, rename, delete) (ISX-2087) - Added automatic loading of custom extensions of InputProcessor, InputInteraction and InputBindingComposite [ISXB-856]](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-856). - Added an IME Input sample scene. +- Added analytics for programmatic `InputAction` setup via `InputActionSetupExtensions`. ## [1.10.0] - 2024-07-24 diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/InputActionSetupExtensions.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/InputActionSetupExtensions.cs index f5b087565d..6a1aa3e7a5 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/InputActionSetupExtensions.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/InputActionSetupExtensions.cs @@ -306,6 +306,23 @@ public static BindingSyntax AddBinding(this InputAction action, string path, str }); } + /// + /// Conditionally compiled helper for logging API usage of code-authored actions. + /// + /// The associated API function. + /// + /// Be extremely carefully to review for indirect calls and overloads to not register analytics twice. + /// Be extremely careful in enabling/disabling tracking before internal calls since those may otherwise + /// be incorrectly registered. + /// + #if UNITY_EDITOR + private static void RegisterApiUsage(UnityEngine.InputSystem.Editor.InputExitPlayModeAnalytic.Api api) + { + UnityEngine.InputSystem.Editor.InputExitPlayModeAnalytic.Register(api); + } + + #endif + /// /// Add a binding that references the given and triggers /// the given . @@ -349,6 +366,10 @@ public static BindingSyntax AddBinding(this InputAction action, InputControl con /// public static BindingSyntax AddBinding(this InputAction action, InputBinding binding = default) { + #if UNITY_EDITOR + RegisterApiUsage(UnityEngine.InputSystem.Editor.InputExitPlayModeAnalytic.Api.AddBinding); + #endif + if (action == null) throw new ArgumentNullException(nameof(action)); @@ -478,6 +499,10 @@ public static BindingSyntax AddBinding(this InputActionMap actionMap, string pat /// public static BindingSyntax AddBinding(this InputActionMap actionMap, InputBinding binding) { + #if UNITY_EDITOR + RegisterApiUsage(UnityEngine.InputSystem.Editor.InputExitPlayModeAnalytic.Api.AddBinding); + #endif + if (actionMap == null) throw new ArgumentNullException(nameof(actionMap)); if (binding.path == null) @@ -501,6 +526,10 @@ public static BindingSyntax AddBinding(this InputActionMap actionMap, InputBindi public static CompositeSyntax AddCompositeBinding(this InputAction action, string composite, string interactions = null, string processors = null) { + #if UNITY_EDITOR + RegisterApiUsage(UnityEngine.InputSystem.Editor.InputExitPlayModeAnalytic.Api.AddCompositeBinding); + #endif + if (action == null) throw new ArgumentNullException(nameof(action)); if (string.IsNullOrEmpty(composite)) @@ -580,6 +609,10 @@ private static int AddBindingInternal(InputActionMap map, InputBinding binding, /// of ). public static BindingSyntax ChangeBinding(this InputAction action, int index) { + #if UNITY_EDITOR + RegisterApiUsage(UnityEngine.InputSystem.Editor.InputExitPlayModeAnalytic.Api.ChangeBinding); + #endif + if (action == null) throw new ArgumentNullException(nameof(action)); @@ -638,6 +671,10 @@ public static BindingSyntax ChangeBinding(this InputAction action, string name) /// of ). public static BindingSyntax ChangeBinding(this InputActionMap actionMap, int index) { + #if UNITY_EDITOR + RegisterApiUsage(UnityEngine.InputSystem.Editor.InputExitPlayModeAnalytic.Api.ChangeBinding); + #endif + if (actionMap == null) throw new ArgumentNullException(nameof(actionMap)); if (index < 0 || index >= actionMap.m_Bindings.LengthSafe()) @@ -836,6 +873,10 @@ public static BindingSyntax ChangeBinding(this InputAction action, InputBinding /// public static BindingSyntax ChangeCompositeBinding(this InputAction action, string compositeName) { + #if UNITY_EDITOR + RegisterApiUsage(UnityEngine.InputSystem.Editor.InputExitPlayModeAnalytic.Api.ChangeCompositeBinding); + #endif + if (action == null) throw new ArgumentNullException(nameof(action)); if (string.IsNullOrEmpty(compositeName)) @@ -877,6 +918,10 @@ public static BindingSyntax ChangeCompositeBinding(this InputAction action, stri /// public static void Rename(this InputAction action, string newName) { + #if UNITY_EDITOR + RegisterApiUsage(UnityEngine.InputSystem.Editor.InputExitPlayModeAnalytic.Api.Rename); + #endif + if (action == null) throw new ArgumentNullException(nameof(action)); if (string.IsNullOrEmpty(newName)) @@ -919,6 +964,10 @@ public static void Rename(this InputAction action, string newName) /// public static void AddControlScheme(this InputActionAsset asset, InputControlScheme controlScheme) { + #if UNITY_EDITOR + RegisterApiUsage(UnityEngine.InputSystem.Editor.InputExitPlayModeAnalytic.Api.AddControlScheme); + #endif + if (asset == null) throw new ArgumentNullException(nameof(asset)); if (string.IsNullOrEmpty(controlScheme.name)) @@ -987,6 +1036,10 @@ public static ControlSchemeSyntax AddControlScheme(this InputActionAsset asset, /// public static void RemoveControlScheme(this InputActionAsset asset, string name) { + #if UNITY_EDITOR + RegisterApiUsage(UnityEngine.InputSystem.Editor.InputExitPlayModeAnalytic.Api.RemoveControlScheme); + #endif + if (asset == null) throw new ArgumentNullException(nameof(asset)); if (string.IsNullOrEmpty(name)) @@ -1007,11 +1060,19 @@ public static void RemoveControlScheme(this InputActionAsset asset, string name) /// public static InputControlScheme WithBindingGroup(this InputControlScheme scheme, string bindingGroup) { + #if UNITY_EDITOR + RegisterApiUsage(UnityEngine.InputSystem.Editor.InputExitPlayModeAnalytic.Api.ControlSchemeWithBindingGroup); + #endif + return new ControlSchemeSyntax(scheme).WithBindingGroup(bindingGroup).Done(); } public static InputControlScheme WithDevice(this InputControlScheme scheme, string controlPath, bool required) { + #if UNITY_EDITOR + RegisterApiUsage(UnityEngine.InputSystem.Editor.InputExitPlayModeAnalytic.Api.ControlSchemeWithDevice); + #endif + if (required) return new ControlSchemeSyntax(scheme).WithRequiredDevice(controlPath).Done(); return new ControlSchemeSyntax(scheme).WithOptionalDevice(controlPath).Done(); @@ -1019,21 +1080,37 @@ public static InputControlScheme WithDevice(this InputControlScheme scheme, stri public static InputControlScheme WithRequiredDevice(this InputControlScheme scheme, string controlPath) { + #if UNITY_EDITOR + RegisterApiUsage(UnityEngine.InputSystem.Editor.InputExitPlayModeAnalytic.Api.ControlSchemeWithRequiredDevice); + #endif + return new ControlSchemeSyntax(scheme).WithRequiredDevice(controlPath).Done(); } public static InputControlScheme WithOptionalDevice(this InputControlScheme scheme, string controlPath) { + #if UNITY_EDITOR + RegisterApiUsage(UnityEngine.InputSystem.Editor.InputExitPlayModeAnalytic.Api.ControlSchemeWithOptionalDevice); + #endif + return new ControlSchemeSyntax(scheme).WithOptionalDevice(controlPath).Done(); } public static InputControlScheme OrWithRequiredDevice(this InputControlScheme scheme, string controlPath) { + #if UNITY_EDITOR + RegisterApiUsage(UnityEngine.InputSystem.Editor.InputExitPlayModeAnalytic.Api.ControlSchemeOrWithRequiredDevice); + #endif + return new ControlSchemeSyntax(scheme).OrWithRequiredDevice(controlPath).Done(); } public static InputControlScheme OrWithOptionalDevice(this InputControlScheme scheme, string controlPath) { + #if UNITY_EDITOR + RegisterApiUsage(UnityEngine.InputSystem.Editor.InputExitPlayModeAnalytic.Api.ControlSchemeOrWithOptionalDevice); + #endif + return new ControlSchemeSyntax(scheme).OrWithOptionalDevice(controlPath).Done(); } diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputActionsEditorSessionAnalytic.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputActionsEditorSessionAnalytic.cs index 2733dd0fca..a966aa18a0 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputActionsEditorSessionAnalytic.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputActionsEditorSessionAnalytic.cs @@ -178,7 +178,7 @@ public void End() #region IInputAnalytic Interface -#if UNITY_EDITOR && UNITY_2023_2_OR_NEWER +#if UNITY_2023_2_OR_NEWER public bool TryGatherData(out UnityEngine.Analytics.IAnalytic.IData data, out Exception error) #else public bool TryGatherData(out InputAnalytics.IInputAnalyticData data, out Exception error) diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputBuildAnalytic.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputBuildAnalytic.cs index e2860d398e..40bb709409 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputBuildAnalytic.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputBuildAnalytic.cs @@ -31,7 +31,7 @@ public InputBuildAnalytic(BuildReport buildReport) public InputAnalytics.InputAnalyticInfo info => new InputAnalytics.InputAnalyticInfo(kEventName, kMaxEventsPerHour, kMaxNumberOfElements); -#if UNITY_EDITOR && UNITY_2023_2_OR_NEWER +#if UNITY_2023_2_OR_NEWER public bool TryGatherData(out UnityEngine.Analytics.IAnalytic.IData data, out Exception error) #else public bool TryGatherData(out InputAnalytics.IInputAnalyticData data, out Exception error) diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputComponentEditorAnalytic.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputComponentEditorAnalytic.cs index d559e7618c..93aef1a521 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputComponentEditorAnalytic.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputComponentEditorAnalytic.cs @@ -72,7 +72,7 @@ public InputComponentEditorAnalytic(InputSystemComponent component) m_Component = component; } -#if UNITY_EDITOR && UNITY_2023_2_OR_NEWER +#if UNITY_2023_2_OR_NEWER public bool TryGatherData(out UnityEngine.Analytics.IAnalytic.IData data, out Exception error) #else public bool TryGatherData(out InputAnalytics.IInputAnalyticData data, out Exception error) @@ -86,4 +86,4 @@ public bool TryGatherData(out InputAnalytics.IInputAnalyticData data, out Except public InputAnalytics.InputAnalyticInfo info { get; } } } -#endif +#endif // UNITY_EDITOR diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputEditorAnalytics.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputEditorAnalytics.cs index 60bc676df3..a96861b7d2 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputEditorAnalytics.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputEditorAnalytics.cs @@ -4,7 +4,7 @@ namespace UnityEngine.InputSystem.Editor { - internal static partial class InputEditorAnalytics + internal static class InputEditorAnalytics { /// /// Represents notification behavior setting associated with and diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputExitPlayModeAnalytic.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputExitPlayModeAnalytic.cs new file mode 100644 index 0000000000..a978775bca --- /dev/null +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputExitPlayModeAnalytic.cs @@ -0,0 +1,165 @@ +#if UNITY_EDITOR + +using System; +using UnityEditor; +using UnityEngine.Serialization; + +namespace UnityEngine.InputSystem.Editor +{ +#if UNITY_2023_2_OR_NEWER + [UnityEngine.Analytics.AnalyticInfo(eventName: kEventName, maxEventsPerHour: kMaxEventsPerHour, + maxNumberOfElements: kMaxNumberOfElements, vendorKey: UnityEngine.InputSystem.InputAnalytics.kVendorKey)] +#endif // UNITY_2023_2_OR_NEWER + internal class InputExitPlayModeAnalytic : UnityEngine.InputSystem.InputAnalytics.IInputAnalytic + { + public const string kEventName = "input_exit_playmode"; + public const int kMaxEventsPerHour = 100; // default: 1000 + public const int kMaxNumberOfElements = 100; // default: 1000 + + /// + /// Enumeration type for code authoring APIs mapping to . + /// + /// + /// This enumeration type may be added to, but NEVER changed, since it would break older data. + /// + public enum Api + { + AddBinding = 0, + AddCompositeBinding = 1, + ChangeBinding = 2, + ChangeCompositeBinding = 3, + Rename = 4, + AddControlScheme = 5, + RemoveControlScheme = 6, + ControlSchemeWithBindingGroup = 7, + ControlSchemeWithDevice = 8, + ControlSchemeWithRequiredDevice = 9, + ControlSchemeWithOptionalDevice = 10, + ControlSchemeOrWithRequiredDevice = 11, + ControlSchemeOrWithOptionalDevice = 12 + } + + private static readonly int[] m_Counters = new int[Enum.GetNames(typeof(Api)).Length]; + + /// + /// Registers a call to the associated API. + /// + /// Enumeration identifying the API. + public static void Register(Api api) + { + if (suppress) + return; + + // Note: Currently discards detailed information and only sets a boolean (aggregated) value. + ++m_Counters[(int)api]; + } + + /// + /// Suppresses the registration of analytics. + /// + /// + /// May be used to temporarily suppress analytics to avoid false positives from internal usage. + /// + public static bool suppress + { + get; set; + } + + // Cache delegate + private static readonly Action PlayModeChanged = OnPlayModeStateChange; + + // Note: Internal visibility to simplify unit testing + internal static void OnPlayModeStateChange(PlayModeStateChange change) + { + if (change == PlayModeStateChange.ExitingEditMode) + { + // Reset all counters when exiting edit mode + Array.Clear(m_Counters, 0, m_Counters.Length); + + // Make sure not suppressed + suppress = false; + } + if (change == PlayModeStateChange.ExitingPlayMode) + { + // Send analytics and unhook delegate when exiting play-mode + EditorApplication.playModeStateChanged -= PlayModeChanged; + new InputExitPlayModeAnalytic().Send(); + + // No reason to not suppress + suppress = true; + } + } + + [InitializeOnEnterPlayMode] + private static void Hook() + { + // Make sure only a single play-mode change delegate is registered + EditorApplication.playModeStateChanged -= PlayModeChanged; + EditorApplication.playModeStateChanged += PlayModeChanged; + } + + private InputExitPlayModeAnalytic() + { + info = new InputAnalytics.InputAnalyticInfo(kEventName, kMaxEventsPerHour, kMaxNumberOfElements); + } + + /// + /// Represents data collected when exiting play-mode.. + /// + /// + /// Ideally this struct should be readonly but then Unity cannot serialize/deserialize it. + /// + [Serializable] + public struct Data : UnityEngine.InputSystem.InputAnalytics.IInputAnalyticData + { + /// + /// Creates a new Data instance. + /// + /// Specifies whether code authoring has been used during play-mode. + public Data(bool usesCodeAuthoring) + { + uses_code_authoring = usesCodeAuthoring; + } + + /// + /// Specifies whether code-authoring (Input Action setup via extensions) was used at least once during play-mode. + /// + public bool uses_code_authoring; + } + +#if UNITY_2023_2_OR_NEWER + public bool TryGatherData(out UnityEngine.Analytics.IAnalytic.IData data, out Exception error) +#else + public bool TryGatherData(out InputAnalytics.IInputAnalyticData data, out Exception error) +#endif + { + try + { + // Determine aggregated perspective, i.e. was "any" code-authoring API used + var usedCodeAuthoringDuringPlayMode = false; + for (var i = 0; i < m_Counters.Length; ++i) + { + if (m_Counters[i] > 0) + { + usedCodeAuthoringDuringPlayMode = true; + break; + } + } + + data = new Data(usedCodeAuthoringDuringPlayMode); + error = null; + return true; + } + catch (Exception e) + { + data = null; + error = e; + return false; + } + } + + public InputAnalytics.InputAnalyticInfo info { get; } + } +} + +#endif // UNITY_EDITOR diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputExitPlayModeAnalytic.cs.meta b/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputExitPlayModeAnalytic.cs.meta new file mode 100644 index 0000000000..dd7700a303 --- /dev/null +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputExitPlayModeAnalytic.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 07c4c48bac384a9e91c29c2f04328c0b +timeCreated: 1724231031 \ No newline at end of file diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/OnScreenStickEditorAnalytic.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/OnScreenStickEditorAnalytic.cs index 964ef9173a..73ad50e788 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/OnScreenStickEditorAnalytic.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/OnScreenStickEditorAnalytic.cs @@ -66,7 +66,7 @@ public OnScreenStickEditorAnalytic(UnityEditor.Editor editor) m_Editor = editor; } -#if UNITY_EDITOR && UNITY_2023_2_OR_NEWER +#if UNITY_2023_2_OR_NEWER public bool TryGatherData(out UnityEngine.Analytics.IAnalytic.IData data, out Exception error) #else public bool TryGatherData(out InputAnalytics.IInputAnalyticData data, out Exception error) @@ -89,4 +89,4 @@ public bool TryGatherData(out InputAnalytics.IInputAnalyticData data, out Except new InputAnalytics.InputAnalyticInfo(kEventName, kMaxEventsPerHour, kMaxNumberOfElements); } } -#endif +#endif // UNITY_EDITOR diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/PlayerInputEditorAnalytic.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/PlayerInputEditorAnalytic.cs index 4520d2eb61..9a821b7f51 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/PlayerInputEditorAnalytic.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/PlayerInputEditorAnalytic.cs @@ -26,7 +26,7 @@ public PlayerInputEditorAnalytic(UnityEditor.Editor editor) public InputAnalytics.InputAnalyticInfo info => new InputAnalytics.InputAnalyticInfo(kEventName, kMaxEventsPerHour, kMaxNumberOfElements); -#if UNITY_EDITOR && UNITY_2023_2_OR_NEWER +#if UNITY_2023_2_OR_NEWER public bool TryGatherData(out UnityEngine.Analytics.IAnalytic.IData data, out Exception error) #else public bool TryGatherData(out InputAnalytics.IInputAnalyticData data, out Exception error) diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/PlayerInputManagerEditorAnalytic.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/PlayerInputManagerEditorAnalytic.cs index 77656d2f02..782152fc76 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/PlayerInputManagerEditorAnalytic.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/PlayerInputManagerEditorAnalytic.cs @@ -23,7 +23,7 @@ public PlayerInputManagerEditorAnalytic(UnityEditor.Editor editor) m_Editor = editor; } -#if UNITY_EDITOR && UNITY_2023_2_OR_NEWER +#if UNITY_2023_2_OR_NEWER public bool TryGatherData(out UnityEngine.Analytics.IAnalytic.IData data, out Exception error) #else public bool TryGatherData(out InputAnalytics.IInputAnalyticData data, out Exception error) diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/VirtualMouseInputEditorAnalytic.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/VirtualMouseInputEditorAnalytic.cs index a3c6c8e13e..6f1ab38610 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/VirtualMouseInputEditorAnalytic.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/VirtualMouseInputEditorAnalytic.cs @@ -72,7 +72,7 @@ public VirtualMouseInputEditorAnalytic(UnityEditor.Editor editor) m_Editor = editor; } -#if UNITY_EDITOR && UNITY_2023_2_OR_NEWER +#if UNITY_2023_2_OR_NEWER public bool TryGatherData(out UnityEngine.Analytics.IAnalytic.IData data, out Exception error) #else public bool TryGatherData(out InputAnalytics.IInputAnalyticData data, out Exception error) diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/OnScreen/OnScreenStick.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/OnScreen/OnScreenStick.cs index da1f8ad175..629f94beb8 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/OnScreen/OnScreenStick.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/OnScreen/OnScreenStick.cs @@ -91,10 +91,16 @@ private void Start() if (m_PointerDownAction == null) m_PointerDownAction = new InputAction(); + #if UNITY_EDITOR + InputExitPlayModeAnalytic.suppress = true; + #endif m_PointerDownAction.AddBinding("/leftButton"); m_PointerDownAction.AddBinding("/tip"); m_PointerDownAction.AddBinding("/touch*/press"); m_PointerDownAction.AddBinding("/trigger"); + #if UNITY_EDITOR + InputExitPlayModeAnalytic.suppress = false; + #endif } if (m_PointerMoveAction == null || m_PointerMoveAction.bindings.Count == 0) @@ -102,9 +108,15 @@ private void Start() if (m_PointerMoveAction == null) m_PointerMoveAction = new InputAction(); + #if UNITY_EDITOR + InputExitPlayModeAnalytic.suppress = true; + #endif m_PointerMoveAction.AddBinding("/position"); m_PointerMoveAction.AddBinding("/position"); m_PointerMoveAction.AddBinding("/touch*/position"); + #if UNITY_EDITOR + InputExitPlayModeAnalytic.suppress = false; + #endif } m_PointerDownAction.started += OnPointerDown; diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/TrackedPoseDriver.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/TrackedPoseDriver.cs index ab14e41722..59b92283b5 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/TrackedPoseDriver.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/TrackedPoseDriver.cs @@ -265,8 +265,7 @@ void BindPosition() if (m_PositionInput.reference == null) { - action.Rename($"{gameObject.name} - TPD - Position"); - action.Enable(); + RenameAndEnable(action, $"{gameObject.name} - TPD - Position"); } } @@ -285,8 +284,7 @@ void BindRotation() if (m_RotationInput.reference == null) { - action.Rename($"{gameObject.name} - TPD - Rotation"); - action.Enable(); + RenameAndEnable(action, $"{gameObject.name} - TPD - Rotation"); } } @@ -305,11 +303,22 @@ void BindTrackingState() if (m_TrackingStateInput.reference == null) { - action.Rename($"{gameObject.name} - TPD - Tracking State"); - action.Enable(); + RenameAndEnable(action, $"{gameObject.name} - TPD - Tracking State"); } } + private void RenameAndEnable(InputAction action, string name) + { +#if UNITY_EDITOR + Editor.InputExitPlayModeAnalytic.suppress = true; +#endif + action.Rename(name); +#if UNITY_EDITOR + Editor.InputExitPlayModeAnalytic.suppress = false; +#endif + action.Enable(); + } + void UnbindPosition() { if (!m_PositionBound) From 5cfed50c485706f7e468c5ad8687432280aff66c Mon Sep 17 00:00:00 2001 From: bmalrat <47957918+bmalrat@users.noreply.github.com> Date: Fri, 27 Sep 2024 08:43:47 -0400 Subject: [PATCH 03/14] NEW: Added canRunInBackground flag in device debug view (#2013) --- Packages/com.unity.inputsystem/CHANGELOG.md | 3 +++ .../InputSystem/Devices/InputDevice.cs | 12 ++++++++++++ .../Editor/Debugger/InputDeviceDebuggerWindow.cs | 2 ++ .../InputSystem/InputManager.cs | 16 +--------------- 4 files changed, 18 insertions(+), 15 deletions(-) diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index 5a555b2373..a63af1b374 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -10,6 +10,9 @@ however, it has to be formatted properly to pass verification tests. ## [Unreleased] - yyyy-mm-dd +### Added +- Added the display of the device flag `CanRunInBackground` in device debug view. + ## [1.11.1] - 2024-09-26 ### Fixed diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs index 4996ba8f02..f2b469bc73 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/InputDevice.cs @@ -255,6 +255,18 @@ public bool canRunInBackground return !(this is Pointer || this is Keyboard); // Anything but pointers and keyboards considered as being able to run in background. #endif + return canDeviceRunInBackground; + } + } + /// + /// In editor, it may differ from canRunInBackground depending on the gameViewFocus setting. + /// This property is used by Device Debug View + /// + /// Whether the device should generate input while in the background. + internal bool canDeviceRunInBackground + { + get + { if ((m_DeviceFlags & DeviceFlags.CanRunInBackgroundHasBeenQueried) != 0) return (m_DeviceFlags & DeviceFlags.CanRunInBackground) != 0; diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/Debugger/InputDeviceDebuggerWindow.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/Debugger/InputDeviceDebuggerWindow.cs index d38943abc8..bda67adbf8 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/Debugger/InputDeviceDebuggerWindow.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/Debugger/InputDeviceDebuggerWindow.cs @@ -347,6 +347,8 @@ private void UpdateDeviceFlags() flags.Add("DisabledInRuntime"); if (m_Device.disabledWhileInBackground) flags.Add("DisabledWhileInBackground"); + if (m_Device.canDeviceRunInBackground) + flags.Add("CanRunInBackground"); m_DeviceFlags = m_Device.m_DeviceFlags; m_DeviceFlagsString = string.Join(", ", flags.ToArray()); } diff --git a/Packages/com.unity.inputsystem/InputSystem/InputManager.cs b/Packages/com.unity.inputsystem/InputSystem/InputManager.cs index eba6c66f9a..989ec623cf 100644 --- a/Packages/com.unity.inputsystem/InputSystem/InputManager.cs +++ b/Packages/com.unity.inputsystem/InputSystem/InputManager.cs @@ -2893,22 +2893,8 @@ internal void AddAvailableDevicesThatAreNowRecognized() private bool ShouldRunDeviceInBackground(InputDevice device) { - var runDeviceInBackground = - m_Settings.backgroundBehavior != InputSettings.BackgroundBehavior.ResetAndDisableAllDevices && + return m_Settings.backgroundBehavior != InputSettings.BackgroundBehavior.ResetAndDisableAllDevices && device.canRunInBackground; - - // In editor, we may override canRunInBackground depending on the gameViewFocus setting. - #if UNITY_EDITOR - if (runDeviceInBackground) - { - if (m_Settings.editorInputBehaviorInPlayMode == InputSettings.EditorInputBehaviorInPlayMode.AllDevicesRespectGameViewFocus) - runDeviceInBackground = false; - else if (m_Settings.editorInputBehaviorInPlayMode == InputSettings.EditorInputBehaviorInPlayMode.PointersAndKeyboardsRespectGameViewFocus) - runDeviceInBackground = !(device is Pointer || device is Keyboard); - } - #endif - - return runDeviceInBackground; } internal void OnFocusChanged(bool focus) From 82ec62491fb328b3810e4ed2d1dc053471bfce4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kan=20Sidenvall?= Date: Fri, 27 Sep 2024 15:44:37 +0200 Subject: [PATCH 04/14] FIX: Corrected invalid CHANGELOG.md (#2015) --- Packages/com.unity.inputsystem/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index a63af1b374..d06a397cfb 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -12,6 +12,7 @@ however, it has to be formatted properly to pass verification tests. ### Added - Added the display of the device flag `CanRunInBackground` in device debug view. +- Added analytics for programmatic `InputAction` setup via `InputActionSetupExtensions` when exiting play-mode. ## [1.11.1] - 2024-09-26 @@ -50,7 +51,6 @@ however, it has to be formatted properly to pass verification tests. - Added tests for Input Action Editor UI for managing action maps (List, create, rename, delete) (ISX-2087) - Added automatic loading of custom extensions of InputProcessor, InputInteraction and InputBindingComposite [ISXB-856]](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-856). - Added an IME Input sample scene. -- Added analytics for programmatic `InputAction` setup via `InputActionSetupExtensions`. ## [1.10.0] - 2024-07-24 From d5f2dff559d60c379cea9aa81290a14cfa81089e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Freire?= Date: Tue, 1 Oct 2024 11:57:56 +0200 Subject: [PATCH 05/14] FIX: Wrong mapping of Xbox Series S|X and Xbox One wireless controllers "View" button on macOS (#2017) --- Packages/com.unity.inputsystem/CHANGELOG.md | 3 +++ .../InputSystem/Plugins/XInput/XboxGamepadMacOS.cs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index d06a397cfb..ecb1e2c82e 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -14,6 +14,9 @@ however, it has to be formatted properly to pass verification tests. - Added the display of the device flag `CanRunInBackground` in device debug view. - Added analytics for programmatic `InputAction` setup via `InputActionSetupExtensions` when exiting play-mode. +### Fixed +- Fixed wrong mapping of Xbox Series S|X and Xbox One wireless controllers "View" button on macOS.[ISXB-385](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-385) + ## [1.11.1] - 2024-09-26 ### Fixed diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XInput/XboxGamepadMacOS.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XInput/XboxGamepadMacOS.cs index f789493444..ab43ddbaec 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XInput/XboxGamepadMacOS.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XInput/XboxGamepadMacOS.cs @@ -111,7 +111,7 @@ internal struct XInputControllerWirelessOSXState : IInputStateTypeInfo public enum Button { Start = 11, - Select = 16, + Select = 10, LeftThumbstickPress = 13, RightThumbstickPress = 14, LeftShoulder = 6, From 3a96dace25464c4fd0ebb562ca38e179f12862da Mon Sep 17 00:00:00 2001 From: Alex Tyrer Date: Tue, 1 Oct 2024 17:52:01 +0100 Subject: [PATCH 06/14] FIX: MakeEscapedJsonString now null-checks inputs. Empty strings also now bypass an allocation. (#2019) [Input System] MakeEscapedJsonString now null-checks inputs. Empty strings also now bypass an allocation. This matches older behaviour on null-checking descriptor fields which is needed for certain device implementations. --- Assets/Tests/InputSystem/CoreTests_Devices.cs | 41 +++++++++++++++---- Packages/com.unity.inputsystem/CHANGELOG.md | 3 ++ .../InputSystem/InputManager.cs | 9 ++++ 3 files changed, 46 insertions(+), 7 deletions(-) diff --git a/Assets/Tests/InputSystem/CoreTests_Devices.cs b/Assets/Tests/InputSystem/CoreTests_Devices.cs index 62b5a9232f..bc4ec5a82b 100644 --- a/Assets/Tests/InputSystem/CoreTests_Devices.cs +++ b/Assets/Tests/InputSystem/CoreTests_Devices.cs @@ -4162,13 +4162,40 @@ public void Devices_RemovingAndReaddingDevice_DoesNotAllocateMemory() recorder.CollectFromAllThreads(); #endif - // We expect a single allocation for each call to ReportNewInputDevice when there is one disconnected device - // - int numberOfRepeats = 2; - int numberOfDisconnectedDevices = 1; - int numberOfCallsToReportNewInputDevicePerRun = 2; - int expectedAllocations = numberOfRepeats * numberOfDisconnectedDevices * numberOfCallsToReportNewInputDevicePerRun; - Assert.AreEqual(expectedAllocations, recorder.sampleBlockCount); + // No allocations are expected. + Assert.AreEqual(0, recorder.sampleBlockCount); + } + + // Regression test to cover having null descriptor fields for a device. Some non-desktop gamepad device types do this. + [Test] + [Category("Devices")] + public void Devices_RemovingAndReaddingDeviceWithNullDescriptorFields_DoesNotThrow() + { + // InputDeviceDescription.ToJson writes empty string fields and not null values, whereas reporting a device via an incomplete description string will fully omit the fields. + string description = @"{ + ""type"": ""Gamepad"", + ""product"": ""TestProduct"" + }"; + + var deviceId = runtime.ReportNewInputDevice(description); + InputSystem.Update(); + + // "Unplug" device. + var removeEvent1 = DeviceRemoveEvent.Create(deviceId); + InputSystem.QueueEvent(ref removeEvent1); + InputSystem.Update(); + + // "Plug" it back in. + deviceId = runtime.ReportNewInputDevice(description); + InputSystem.Update(); + + // Repeat that sequence. + var removeEvent2 = DeviceRemoveEvent.Create(deviceId); + InputSystem.QueueEvent(ref removeEvent2); + InputSystem.Update(); + + runtime.ReportNewInputDevice(description); + InputSystem.Update(); } [Test] diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index ecb1e2c82e..0cd08946ae 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -10,6 +10,9 @@ however, it has to be formatted properly to pass verification tests. ## [Unreleased] - yyyy-mm-dd +### Fixed +- Fixed `NullReferenceException` from disconnecting and reconnecting a GXDKGamepad. + ### Added - Added the display of the device flag `CanRunInBackground` in device debug view. - Added analytics for programmatic `InputAction` setup via `InputActionSetupExtensions` when exiting play-mode. diff --git a/Packages/com.unity.inputsystem/InputSystem/InputManager.cs b/Packages/com.unity.inputsystem/InputSystem/InputManager.cs index 989ec623cf..10e3c17fb8 100644 --- a/Packages/com.unity.inputsystem/InputSystem/InputManager.cs +++ b/Packages/com.unity.inputsystem/InputSystem/InputManager.cs @@ -2562,6 +2562,15 @@ private JsonParser.JsonString MakeEscapedJsonString(string theString) // To avoid a very costly escape-skipping character-by-character string comparison in JsonParser.Json.Equals() we // reconstruct an escaped string and make an escaped JsonParser.JsonString and use that for the comparison instead. // + if (string.IsNullOrEmpty(theString)) + { + return new JsonParser.JsonString + { + text = string.Empty, // text should be an empty string and not null for consistency on property comparisons + hasEscapes = false + }; + } + var builder = new StringBuilder(); var length = theString.Length; var hasEscapes = false; From ff7837e94c349e472e487529a0c804762fddec8e Mon Sep 17 00:00:00 2001 From: adrian-koretski-unity3d Date: Wed, 2 Oct 2024 13:59:34 -0400 Subject: [PATCH 07/14] =?UTF-8?q?FIX:=20ISXB-687=20=20=20Added=20guard=20c?= =?UTF-8?q?lause=20to=20RemovePointerAtIndex=20in=20InputSy=E2=80=A6=20(#1?= =?UTF-8?q?982)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * FIX: ISXB-687 Added guard clause to RemovePointerAtIndex in InputSystemUIInputModule to not remove touch pointers on the same frame they are released. * Added changelog entry for fix ISXB-543 * Fixed infinite loop caused by FilterPointerStatesByType() trying to force their release on the same frame they occur. Ran the formatter and applied changes to CHANGELOG.md * Fixed issue where touch pointers don't get released when mouse or pen inputs happen. * Fixed incorrect boolean logic in InputSystemUIInputModule.cs causing certain pointers to be incorrectly released or not released. * Moved changelog entry for ISXB-687 into unreleased. * Moved double touch pointer changelog entry to unreleased. * Removed additional duplicate entries in changelog * Removed superfluous code to get pointer state that is never used in InputSystemUIInputModule. --- Packages/com.unity.inputsystem/CHANGELOG.md | 1 + .../Plugins/UI/InputSystemUIInputModule.cs | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index 0cd08946ae..f8e32c4e35 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -11,6 +11,7 @@ however, it has to be formatted properly to pass verification tests. ## [Unreleased] - yyyy-mm-dd ### Fixed +- Fixed touch pointers being released twice causing an index out of bounds error. [ISXB-687](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-687) - Fixed `NullReferenceException` from disconnecting and reconnecting a GXDKGamepad. ### Added diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/UI/InputSystemUIInputModule.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/UI/InputSystemUIInputModule.cs index 7d61c3643f..c65c6a6700 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/UI/InputSystemUIInputModule.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/UI/InputSystemUIInputModule.cs @@ -1947,6 +1947,13 @@ private void RemovePointerAtIndex(int index) { Debug.Assert(m_PointerStates[index].eventData.pointerEnter == null, "Pointer should have exited all objects before being removed"); + // We don't want to release touch pointers on the same frame they are released (unpressed). They get cleaned up one frame later in Process() + ref var state = ref GetPointerStateForIndex(index); + if (state.pointerType == UIPointerType.Touch && (state.leftButton.isPressed || state.leftButton.wasReleasedThisFrame)) + { + return; + } + // Retain event data so that we can reuse the event the next time we allocate a PointerModel record. var eventData = m_PointerStates[index].eventData; Debug.Assert(eventData != null, "Pointer state should have an event instance!"); @@ -2209,7 +2216,13 @@ private void FilterPointerStatesByType() // We have input on a mouse or pen. Kill all touch and tracked pointers we may have. for (var i = 0; i < m_PointerStates.length; ++i) { - if (m_PointerStates[i].pointerType != UIPointerType.MouseOrPen) + ref var state = ref GetPointerStateForIndex(i); + // Touch pointers need to get forced to no longer be pressed otherwise they will not get released in subsequent frames. + if (m_PointerStates[i].pointerType == UIPointerType.Touch) + { + state.leftButton.isPressed = false; + } + if (m_PointerStates[i].pointerType != UIPointerType.MouseOrPen && m_PointerStates[i].pointerType != UIPointerType.Touch || (m_PointerStates[i].pointerType == UIPointerType.Touch && !state.leftButton.isPressed && !state.leftButton.wasReleasedThisFrame)) { SendPointerExitEventsAndRemovePointer(i); --i; From bb685c584355252da3cb7555552238e7bee0ce76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Freire?= Date: Fri, 4 Oct 2024 13:30:26 +0200 Subject: [PATCH 08/14] FIX: The button is not clickable when using Windows touch simulation inputs (ISXB-483) (#2012) * Pair simulated touchscreen with PlayerInput user * Add period to end of sentence * Fix formatting * Refactored initial fix to queue state events instead Based on review and code comments, this seems like a better solution that fixes the main problem and also better simulates a touchscreen when used together with PlayerInput. Automatic pairing and control scheme occurs now since we're using input events a real device would also use. * Change logic to be based on state events The previous logic was based on changing state and didn't apply if we queued events. Also, this commit avoids processing the queued events for the simulated Touchscreen. * Remove unnecessary left over code * Fix setting wrong touchIDs when moving multiple touches --- Packages/com.unity.inputsystem/CHANGELOG.md | 1 + .../Plugins/EnhancedTouch/TouchSimulation.cs | 52 +++++++------------ 2 files changed, 19 insertions(+), 34 deletions(-) diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index f8e32c4e35..5740b7e86f 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -30,6 +30,7 @@ however, it has to be formatted properly to pass verification tests. - 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. +- Fixed simulated touch input not working with PlayerInput component [ISXB-483](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-483). ### Changed - Renamed editor Resources directories to PackageResources to fix package validation warnings. diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/EnhancedTouch/TouchSimulation.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/EnhancedTouch/TouchSimulation.cs index bc97fb4d55..108e83e5a4 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/EnhancedTouch/TouchSimulation.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/EnhancedTouch/TouchSimulation.cs @@ -121,6 +121,12 @@ protected void RemovePointer(Pointer pointer) private unsafe void OnEvent(InputEventPtr eventPtr, InputDevice device) { + if (device == simulatedTouchscreen) + { + // Avoid processing events queued by this simulation device + return; + } + var pointerIndex = m_Pointers.IndexOfReference(device, m_NumPointers); if (pointerIndex < 0) return; @@ -129,9 +135,6 @@ private unsafe void OnEvent(InputEventPtr eventPtr, InputDevice device) if (eventType != StateEvent.Type && eventType != DeltaStateEvent.Type) return; - ////TODO: this can be simplified if we use events instead of InputState.Change() but doing so requires work on buffering events while processing; also - //// needs extra handling to not lag into the next frame - ////REVIEW: should we have specialized paths for MouseState and PenState here? (probably can only use for StateEvents) Pointer pointer = m_Pointers[pointerIndex]; @@ -254,6 +257,9 @@ protected void OnEnable() if (m_Touches == null) m_Touches = new ButtonControl[simulatedTouchscreen.touches.Count]; + if (m_TouchIds == null) + m_TouchIds = new int[simulatedTouchscreen.touches.Count]; + foreach (var device in InputSystem.devices) OnDeviceChange(device, InputDeviceChange.Added); @@ -280,7 +286,6 @@ protected void OnDisable() m_NumPointers = 0; m_LastTouchId = 0; - m_PrimaryTouchIndex = -1; InputSystem.onDeviceChange -= m_OnDeviceChange; InputSystem.onEvent -= m_OnEvent; @@ -292,55 +297,34 @@ private unsafe void UpdateTouch(int touchIndex, int pointerIndex, TouchPhase pha Debug.Assert(m_CurrentDisplayIndices[pointerIndex] <= byte.MaxValue, "Display index was larger than expected"); byte displayIndex = (byte)m_CurrentDisplayIndices[pointerIndex]; + // We need to partially set TouchState in a similar way that the Native side would do, but deriving that + // data from the Pointer events. + // The handling of the remaining fields is done by the Touchscreen.OnStateEvent() callback. var touch = new TouchState { phase = phase, position = position, displayIndex = displayIndex }; - var time = eventPtr.valid ? eventPtr.time : InputState.currentTime; - - var oldTouchState = (TouchState*)((byte*)simulatedTouchscreen.currentStatePtr + - simulatedTouchscreen.touches[touchIndex].stateBlock.byteOffset); if (phase == TouchPhase.Began) { - touch.isPrimaryTouch = m_PrimaryTouchIndex < 0; - touch.startTime = time; + touch.startTime = eventPtr.valid ? eventPtr.time : InputState.currentTime; touch.startPosition = position; touch.touchId = ++m_LastTouchId; - touch.tapCount = oldTouchState->tapCount; // Get reset automatically by Touchscreen. - - if (touch.isPrimaryTouch) - m_PrimaryTouchIndex = touchIndex; + m_TouchIds[touchIndex] = m_LastTouchId; } else { - touch.touchId = oldTouchState->touchId; - touch.isPrimaryTouch = m_PrimaryTouchIndex == touchIndex; - touch.delta = position - oldTouchState->position; - touch.startPosition = oldTouchState->startPosition; - touch.startTime = oldTouchState->startTime; - touch.tapCount = oldTouchState->tapCount; - - if (phase == TouchPhase.Ended) - { - touch.isTap = time - oldTouchState->startTime <= Touchscreen.s_TapTime && - (position - oldTouchState->startPosition).sqrMagnitude <= Touchscreen.s_TapRadiusSquared; - if (touch.isTap) - ++touch.tapCount; - } + touch.touchId = m_TouchIds[touchIndex]; } - if (touch.isPrimaryTouch) - InputState.Change(simulatedTouchscreen.primaryTouch, touch, eventPtr: eventPtr); - InputState.Change(simulatedTouchscreen.touches[touchIndex], touch, eventPtr: eventPtr); + //NOTE: Processing these events still happen in the current frame. + InputSystem.QueueStateEvent(simulatedTouchscreen, touch); if (phase.IsEndedOrCanceled()) { m_Touches[touchIndex] = null; - if (m_PrimaryTouchIndex == touchIndex) - m_PrimaryTouchIndex = -1; } } @@ -349,9 +333,9 @@ private unsafe void UpdateTouch(int touchIndex, int pointerIndex, TouchPhase pha [NonSerialized] private Vector2[] m_CurrentPositions; [NonSerialized] private int[] m_CurrentDisplayIndices; [NonSerialized] private ButtonControl[] m_Touches; + [NonSerialized] private int[] m_TouchIds; [NonSerialized] private int m_LastTouchId; - [NonSerialized] private int m_PrimaryTouchIndex = -1; [NonSerialized] private Action m_OnDeviceChange; [NonSerialized] private Action m_OnEvent; From b3549acfeea7d10648291860928ab4b65e6d8f50 Mon Sep 17 00:00:00 2001 From: Paulius Dervinis <54306142+Pauliusd01@users.noreply.github.com> Date: Thu, 10 Oct 2024 15:30:55 +0300 Subject: [PATCH 09/14] FIX: Analytics errors on consoles by reverting changes from #1991 (#2024) * Revert #1991 changes to analytics --- Packages/com.unity.inputsystem/CHANGELOG.md | 1 + .../com.unity.inputsystem/InputSystem/NativeInputRuntime.cs | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index 5740b7e86f..6ddc226dbd 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -13,6 +13,7 @@ however, it has to be formatted properly to pass verification tests. ### Fixed - Fixed touch pointers being released twice causing an index out of bounds error. [ISXB-687](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-687) - Fixed `NullReferenceException` from disconnecting and reconnecting a GXDKGamepad. +- Fixed "AnalyticsResult" errors on consoles [ISXB-1107] ### Added - Added the display of the device flag `CanRunInBackground` in device debug view. diff --git a/Packages/com.unity.inputsystem/InputSystem/NativeInputRuntime.cs b/Packages/com.unity.inputsystem/InputSystem/NativeInputRuntime.cs index 5c4c4a2734..f82d5fa8b3 100644 --- a/Packages/com.unity.inputsystem/InputSystem/NativeInputRuntime.cs +++ b/Packages/com.unity.inputsystem/InputSystem/NativeInputRuntime.cs @@ -393,6 +393,7 @@ 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); @@ -404,7 +405,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 (ENABLE_CLOUD_SERVICES_ANALYTICS) // Implicitly: !UNITY_EDITOR && UNITY_ANALYTICS + #elif (UNITY_ANALYTICS) // Implicitly: !UNITY_EDITOR var info = analytic.info; Analytics.Analytics.RegisterEvent(info.Name, info.MaxEventsPerHour, info.MaxNumberOfElements, InputAnalytics.kVendorKey); if (analytic.TryGatherData(out var data, out var error)) @@ -412,6 +413,7 @@ 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 From 5f6e2f53217bec34dc4ccb252269e6291cd53539 Mon Sep 17 00:00:00 2001 From: bmalrat <47957918+bmalrat@users.noreply.github.com> Date: Thu, 10 Oct 2024 10:42:53 -0400 Subject: [PATCH 10/14] FIX: Fixed wrong `Display Index` value for touchscreen events (ISXB-1101) (#2021) --- Packages/com.unity.inputsystem/CHANGELOG.md | 5 +- .../Devices/Precompiled/FastTouchscreen.cs | 351 +++++++++--------- .../InputSystem/Devices/Touchscreen.cs | 2 +- 3 files changed, 178 insertions(+), 180 deletions(-) diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index 6ddc226dbd..b0dc44e136 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -13,15 +13,14 @@ however, it has to be formatted properly to pass verification tests. ### Fixed - Fixed touch pointers being released twice causing an index out of bounds error. [ISXB-687](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-687) - Fixed `NullReferenceException` from disconnecting and reconnecting a GXDKGamepad. +- Fixed wrong mapping of Xbox Series S|X and Xbox One wireless controllers "View" button on macOS.[ISXB-385](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-385) - Fixed "AnalyticsResult" errors on consoles [ISXB-1107] +- Fixed wrong `Display Index` value for touchscreen events.[ISXB-1101](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1101) ### Added - Added the display of the device flag `CanRunInBackground` in device debug view. - Added analytics for programmatic `InputAction` setup via `InputActionSetupExtensions` when exiting play-mode. -### Fixed -- Fixed wrong mapping of Xbox Series S|X and Xbox One wireless controllers "View" button on macOS.[ISXB-385](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-385) - ## [1.11.1] - 2024-09-26 ### Fixed diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastTouchscreen.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastTouchscreen.cs index 3b75a754e5..40a3fd31e0 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastTouchscreen.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastTouchscreen.cs @@ -60,6 +60,9 @@ public FastTouchscreen() // /Touchscreen/press var ctrlTouchscreenpress = Initialize_ctrlTouchscreenpress(kTouchPressLayout, this); + // /Touchscreen/displayIndex + var ctrlTouchscreendisplayIndex = Initialize_ctrlTouchscreendisplayIndex(kIntegerLayout, this); + // /Touchscreen/touch0 var ctrlTouchscreentouch0 = Initialize_ctrlTouchscreentouch0(kTouchLayout, this); @@ -90,9 +93,6 @@ public FastTouchscreen() // /Touchscreen/touch9 var ctrlTouchscreentouch9 = Initialize_ctrlTouchscreentouch9(kTouchLayout, this); - // /Touchscreen/displayIndex - var ctrlTouchscreendisplayIndex = Initialize_ctrlTouchscreendisplayIndex(kIntegerLayout, this); - // /Touchscreen/primaryTouch/touchId var ctrlTouchscreenprimaryTouchtouchId = Initialize_ctrlTouchscreenprimaryTouchtouchId(kIntegerLayout, ctrlTouchscreenprimaryTouch); @@ -973,7 +973,7 @@ public FastTouchscreen() this.radius = ctrlTouchscreenradius; this.pressure = ctrlTouchscreenpressure; this.press = ctrlTouchscreenpress; - this.displayIndex = ctrlTouchscreenprimaryTouchdisplayIndex; + this.displayIndex = ctrlTouchscreendisplayIndex; ctrlTouchscreenprimaryTouch.press = ctrlTouchscreenprimaryTouchpress; ctrlTouchscreenprimaryTouch.displayIndex = ctrlTouchscreenprimaryTouchdisplayIndex; ctrlTouchscreenprimaryTouch.touchId = ctrlTouchscreenprimaryTouchtouchId; @@ -1265,7 +1265,7 @@ public FastTouchscreen() { 32785u, 16810014u, 16810026u, 33587231u, 33587243u, 50364450u, 50364451u, 50364452u, 50364462u, 50364463u , 50364464u, 67141664u, 67141665u, 67141669u, 67141676u, 67141677u, 67141681u, 83918851u, 83918868u, 100696102u - , 100696114u, 117473319u, 117473331u, 134225925u, 134225942u, 134225943u, 138420248u, 142614553u, 142622736u, 146801690u + , 100696114u, 117473319u, 117473331u, 134225925u, 134225942u, 134225943u, 138420248u, 142614534u, 142614553u, 146801690u , 148898843u, 167837724u, 201359400u, 218136617u, 234913844u, 251691073u, 268468290u, 285245509u, 285245510u, 285245511u , 302022723u, 302022724u, 302022728u, 318799927u, 335577161u, 352354378u, 369107001u, 369107002u, 373301307u, 377495612u , 381682749u, 383779902u, 402718783u, 436240459u, 453017676u, 469794893u, 486572122u, 503349339u, 520126558u, 520126559u @@ -1293,162 +1293,161 @@ public FastTouchscreen() builder.WithControlTree(new byte[] { // Control tree nodes as bytes - 63, 19, 1, 0, 0, 0, 0, 192, 8, 3, 0, 0, 0, 0, 63, 19, 5, 1, 0, 0, 0, 128, 3, 5, 0, 0, 0, 0, 192, 8 - , 107, 0, 0, 0, 0, 192, 1, 7, 0, 0, 0, 1, 128, 3, 57, 0, 68, 0, 1, 192, 0, 9, 0, 0, 0, 0, 192, 1, 21, 0 + 63, 19, 1, 0, 0, 0, 0, 192, 8, 3, 0, 0, 0, 0, 63, 19, 1, 1, 0, 0, 0, 128, 3, 5, 0, 0, 0, 0, 192, 8 + , 103, 0, 0, 0, 0, 192, 1, 7, 0, 0, 0, 1, 128, 3, 53, 0, 68, 0, 1, 192, 0, 9, 0, 0, 0, 0, 192, 1, 21, 0 , 0, 0, 0, 96, 0, 11, 0, 0, 0, 0, 192, 0, 15, 0, 0, 0, 0, 32, 0, 255, 255, 1, 0, 1, 96, 0, 13, 0, 2, 0 , 2, 64, 0, 255, 255, 4, 0, 2, 96, 0, 255, 255, 6, 0, 2, 144, 0, 17, 0, 8, 0, 8, 192, 0, 19, 0, 16, 0, 8, 120 - , 0, 255, 255, 24, 0, 6, 144, 0, 255, 255, 30, 0, 6, 168, 0, 255, 255, 36, 0, 2, 192, 0, 255, 255, 38, 0, 2, 32, 1, 23 - , 0, 0, 0, 0, 192, 1, 51, 0, 0, 0, 0, 8, 1, 25, 0, 0, 0, 0, 32, 1, 35, 0, 0, 0, 0, 228, 0, 27, 0, 40 + , 0, 255, 255, 24, 0, 6, 144, 0, 255, 255, 30, 0, 6, 168, 0, 255, 255, 36, 0, 2, 192, 0, 255, 255, 38, 0, 2, 29, 1, 23 + , 0, 0, 0, 0, 192, 1, 47, 0, 0, 0, 0, 8, 1, 25, 0, 0, 0, 0, 29, 1, 35, 0, 0, 0, 0, 228, 0, 27, 0, 40 , 0, 4, 8, 1, 29, 0, 44, 0, 4, 210, 0, 255, 255, 48, 0, 2, 228, 0, 255, 255, 50, 0, 2, 246, 0, 255, 255, 0, 0, 0 , 8, 1, 31, 0, 0, 0, 0, 255, 0, 255, 255, 0, 0, 0, 8, 1, 33, 0, 0, 0, 0, 4, 1, 255, 255, 52, 0, 3, 8, 1 - , 255, 255, 55, 0, 3, 16, 1, 255, 255, 58, 0, 1, 32, 1, 37, 0, 6, 2, 1, 25, 1, 39, 0, 0, 0, 0, 32, 1, 45, 0 - , 0, 0, 0, 21, 1, 255, 255, 59, 0, 1, 25, 1, 41, 0, 60, 0, 1, 23, 1, 255, 255, 0, 0, 0, 25, 1, 43, 0, 0, 0 - , 0, 24, 1, 255, 255, 0, 0, 0, 25, 1, 255, 255, 61, 0, 1, 29, 1, 47, 0, 0, 0, 0, 32, 1, 255, 255, 0, 0, 0, 27 - , 1, 255, 255, 0, 0, 0, 29, 1, 49, 0, 0, 0, 0, 28, 1, 255, 255, 0, 0, 0, 29, 1, 255, 255, 62, 0, 1, 128, 1, 53 - , 0, 0, 0, 0, 192, 1, 55, 0, 65, 0, 1, 80, 1, 255, 255, 63, 0, 1, 128, 1, 255, 255, 64, 0, 1, 160, 1, 255, 255, 66 - , 0, 1, 192, 1, 255, 255, 67, 0, 1, 160, 2, 59, 0, 92, 0, 1, 128, 3, 75, 0, 93, 0, 1, 48, 2, 61, 0, 77, 0, 4 - , 160, 2, 69, 0, 81, 0, 4, 248, 1, 63, 0, 71, 0, 2, 48, 2, 65, 0, 73, 0, 2, 220, 1, 255, 255, 69, 0, 1, 248, 1 - , 255, 255, 70, 0, 1, 32, 2, 67, 0, 0, 0, 0, 48, 2, 255, 255, 0, 0, 0, 12, 2, 255, 255, 75, 0, 1, 32, 2, 255, 255 - , 76, 0, 1, 96, 2, 71, 0, 0, 0, 0, 160, 2, 73, 0, 0, 0, 0, 72, 2, 255, 255, 85, 0, 3, 96, 2, 255, 255, 88, 0 - , 3, 128, 2, 255, 255, 91, 0, 1, 160, 2, 255, 255, 94, 0, 1, 16, 3, 77, 0, 105, 0, 1, 128, 3, 103, 0, 106, 0, 1, 216 - , 2, 79, 0, 0, 0, 0, 16, 3, 87, 0, 0, 0, 0, 188, 2, 255, 255, 95, 0, 1, 216, 2, 81, 0, 96, 0, 1, 200, 2, 83 - , 0, 0, 0, 0, 216, 2, 85, 0, 0, 0, 0, 194, 2, 255, 255, 97, 0, 2, 200, 2, 255, 255, 99, 0, 2, 208, 2, 255, 255, 101 - , 0, 1, 216, 2, 255, 255, 102, 0, 1, 244, 2, 89, 0, 0, 0, 0, 16, 3, 255, 255, 0, 0, 0, 230, 2, 91, 0, 0, 0, 0 - , 244, 2, 255, 255, 0, 0, 0, 223, 2, 93, 0, 0, 0, 0, 230, 2, 255, 255, 0, 0, 0, 220, 2, 95, 0, 0, 0, 0, 223, 2 - , 99, 0, 0, 0, 0, 218, 2, 97, 0, 0, 0, 0, 220, 2, 255, 255, 0, 0, 0, 217, 2, 255, 255, 103, 0, 1, 218, 2, 255, 255 - , 0, 0, 0, 222, 2, 101, 0, 0, 0, 0, 223, 2, 255, 255, 0, 0, 0, 221, 2, 255, 255, 104, 0, 1, 222, 2, 255, 255, 0, 0 - , 0, 72, 3, 255, 255, 107, 0, 2, 128, 3, 105, 0, 109, 0, 2, 100, 3, 255, 255, 111, 0, 1, 128, 3, 255, 255, 112, 0, 1, 0 - , 7, 109, 0, 0, 0, 0, 192, 8, 211, 0, 203, 0, 1, 64, 5, 111, 0, 113, 0, 1, 0, 7, 161, 0, 158, 0, 1, 96, 4, 113 - , 0, 137, 0, 1, 64, 5, 129, 0, 138, 0, 1, 240, 3, 115, 0, 122, 0, 4, 96, 4, 123, 0, 126, 0, 4, 184, 3, 117, 0, 116 - , 0, 2, 240, 3, 119, 0, 118, 0, 2, 156, 3, 255, 255, 114, 0, 1, 184, 3, 255, 255, 115, 0, 1, 224, 3, 121, 0, 0, 0, 0 - , 240, 3, 255, 255, 0, 0, 0, 204, 3, 255, 255, 120, 0, 1, 224, 3, 255, 255, 121, 0, 1, 32, 4, 125, 0, 0, 0, 0, 96, 4 - , 127, 0, 0, 0, 0, 8, 4, 255, 255, 130, 0, 3, 32, 4, 255, 255, 133, 0, 3, 64, 4, 255, 255, 136, 0, 1, 96, 4, 255, 255 - , 139, 0, 1, 208, 4, 131, 0, 150, 0, 1, 64, 5, 157, 0, 151, 0, 1, 152, 4, 133, 0, 0, 0, 0, 208, 4, 141, 0, 0, 0 - , 0, 124, 4, 255, 255, 140, 0, 1, 152, 4, 135, 0, 141, 0, 1, 136, 4, 137, 0, 0, 0, 0, 152, 4, 139, 0, 0, 0, 0, 130 - , 4, 255, 255, 142, 0, 2, 136, 4, 255, 255, 144, 0, 2, 144, 4, 255, 255, 146, 0, 1, 152, 4, 255, 255, 147, 0, 1, 180, 4, 143 - , 0, 0, 0, 0, 208, 4, 255, 255, 0, 0, 0, 166, 4, 145, 0, 0, 0, 0, 180, 4, 255, 255, 0, 0, 0, 159, 4, 147, 0, 0 - , 0, 0, 166, 4, 255, 255, 0, 0, 0, 156, 4, 149, 0, 0, 0, 0, 159, 4, 153, 0, 0, 0, 0, 154, 4, 151, 0, 0, 0, 0 - , 156, 4, 255, 255, 0, 0, 0, 153, 4, 255, 255, 148, 0, 1, 154, 4, 255, 255, 0, 0, 0, 158, 4, 155, 0, 0, 0, 0, 159, 4 - , 255, 255, 0, 0, 0, 157, 4, 255, 255, 149, 0, 1, 158, 4, 255, 255, 0, 0, 0, 8, 5, 255, 255, 152, 0, 2, 64, 5, 159, 0 - , 154, 0, 2, 36, 5, 255, 255, 156, 0, 1, 64, 5, 255, 255, 157, 0, 1, 32, 6, 163, 0, 182, 0, 1, 0, 7, 179, 0, 183, 0 - , 1, 176, 5, 165, 0, 167, 0, 4, 32, 6, 173, 0, 171, 0, 4, 120, 5, 167, 0, 161, 0, 2, 176, 5, 169, 0, 163, 0, 2, 92 - , 5, 255, 255, 159, 0, 1, 120, 5, 255, 255, 160, 0, 1, 160, 5, 171, 0, 0, 0, 0, 176, 5, 255, 255, 0, 0, 0, 140, 5, 255 - , 255, 165, 0, 1, 160, 5, 255, 255, 166, 0, 1, 224, 5, 175, 0, 0, 0, 0, 32, 6, 177, 0, 0, 0, 0, 200, 5, 255, 255, 175 - , 0, 3, 224, 5, 255, 255, 178, 0, 3, 0, 6, 255, 255, 181, 0, 1, 32, 6, 255, 255, 184, 0, 1, 144, 6, 181, 0, 195, 0, 1 - , 0, 7, 207, 0, 196, 0, 1, 88, 6, 183, 0, 0, 0, 0, 144, 6, 191, 0, 0, 0, 0, 60, 6, 255, 255, 185, 0, 1, 88, 6 - , 185, 0, 186, 0, 1, 72, 6, 187, 0, 0, 0, 0, 88, 6, 189, 0, 0, 0, 0, 66, 6, 255, 255, 187, 0, 2, 72, 6, 255, 255 - , 189, 0, 2, 80, 6, 255, 255, 191, 0, 1, 88, 6, 255, 255, 192, 0, 1, 116, 6, 193, 0, 0, 0, 0, 144, 6, 255, 255, 0, 0 - , 0, 102, 6, 195, 0, 0, 0, 0, 116, 6, 255, 255, 0, 0, 0, 95, 6, 197, 0, 0, 0, 0, 102, 6, 255, 255, 0, 0, 0, 92 - , 6, 199, 0, 0, 0, 0, 95, 6, 203, 0, 0, 0, 0, 90, 6, 201, 0, 0, 0, 0, 92, 6, 255, 255, 0, 0, 0, 89, 6, 255 - , 255, 193, 0, 1, 90, 6, 255, 255, 0, 0, 0, 94, 6, 205, 0, 0, 0, 0, 95, 6, 255, 255, 0, 0, 0, 93, 6, 255, 255, 194 - , 0, 1, 94, 6, 255, 255, 0, 0, 0, 200, 6, 255, 255, 197, 0, 2, 0, 7, 209, 0, 199, 0, 2, 228, 6, 255, 255, 201, 0, 1 - , 0, 7, 255, 255, 202, 0, 1, 224, 7, 213, 0, 227, 0, 1, 192, 8, 229, 0, 228, 0, 1, 112, 7, 215, 0, 212, 0, 4, 224, 7 - , 223, 0, 216, 0, 4, 56, 7, 217, 0, 206, 0, 2, 112, 7, 219, 0, 208, 0, 2, 28, 7, 255, 255, 204, 0, 1, 56, 7, 255, 255 - , 205, 0, 1, 96, 7, 221, 0, 0, 0, 0, 112, 7, 255, 255, 0, 0, 0, 76, 7, 255, 255, 210, 0, 1, 96, 7, 255, 255, 211, 0 - , 1, 160, 7, 225, 0, 0, 0, 0, 224, 7, 227, 0, 0, 0, 0, 136, 7, 255, 255, 220, 0, 3, 160, 7, 255, 255, 223, 0, 3, 192 - , 7, 255, 255, 226, 0, 1, 224, 7, 255, 255, 229, 0, 1, 80, 8, 231, 0, 240, 0, 1, 192, 8, 1, 1, 241, 0, 1, 24, 8, 233 - , 0, 0, 0, 0, 80, 8, 241, 0, 0, 0, 0, 252, 7, 255, 255, 230, 0, 1, 24, 8, 235, 0, 231, 0, 1, 8, 8, 237, 0, 0 - , 0, 0, 24, 8, 239, 0, 0, 0, 0, 2, 8, 255, 255, 232, 0, 2, 8, 8, 255, 255, 234, 0, 2, 16, 8, 255, 255, 236, 0, 1 - , 24, 8, 255, 255, 237, 0, 1, 52, 8, 243, 0, 0, 0, 0, 80, 8, 255, 255, 0, 0, 0, 38, 8, 245, 0, 0, 0, 0, 52, 8 - , 255, 255, 0, 0, 0, 31, 8, 247, 0, 0, 0, 0, 38, 8, 255, 255, 0, 0, 0, 28, 8, 249, 0, 0, 0, 0, 31, 8, 253, 0 - , 0, 0, 0, 26, 8, 251, 0, 0, 0, 0, 28, 8, 255, 255, 0, 0, 0, 25, 8, 255, 255, 238, 0, 1, 26, 8, 255, 255, 0, 0 - , 0, 30, 8, 255, 0, 0, 0, 0, 31, 8, 255, 255, 0, 0, 0, 29, 8, 255, 255, 239, 0, 1, 30, 8, 255, 255, 0, 0, 0, 136 - , 8, 255, 255, 242, 0, 2, 192, 8, 3, 1, 244, 0, 2, 164, 8, 255, 255, 246, 0, 1, 192, 8, 255, 255, 247, 0, 1, 0, 14, 7 - , 1, 0, 0, 0, 63, 19, 161, 1, 0, 0, 0, 64, 12, 9, 1, 0, 0, 0, 0, 14, 111, 1, 82, 1, 1, 128, 10, 11, 1, 248 - , 0, 1, 64, 12, 61, 1, 37, 1, 1, 160, 9, 13, 1, 16, 1, 1, 128, 10, 29, 1, 17, 1, 1, 48, 9, 15, 1, 1, 1, 4 - , 160, 9, 23, 1, 5, 1, 4, 248, 8, 17, 1, 251, 0, 2, 48, 9, 19, 1, 253, 0, 2, 220, 8, 255, 255, 249, 0, 1, 248, 8 - , 255, 255, 250, 0, 1, 32, 9, 21, 1, 0, 0, 0, 48, 9, 255, 255, 0, 0, 0, 12, 9, 255, 255, 255, 0, 1, 32, 9, 255, 255 - , 0, 1, 1, 96, 9, 25, 1, 0, 0, 0, 160, 9, 27, 1, 0, 0, 0, 72, 9, 255, 255, 9, 1, 3, 96, 9, 255, 255, 12, 1 - , 3, 128, 9, 255, 255, 15, 1, 1, 160, 9, 255, 255, 18, 1, 1, 16, 10, 31, 1, 29, 1, 1, 128, 10, 57, 1, 30, 1, 1, 216 - , 9, 33, 1, 0, 0, 0, 16, 10, 41, 1, 0, 0, 0, 188, 9, 255, 255, 19, 1, 1, 216, 9, 35, 1, 20, 1, 1, 200, 9, 37 - , 1, 0, 0, 0, 216, 9, 39, 1, 0, 0, 0, 194, 9, 255, 255, 21, 1, 2, 200, 9, 255, 255, 23, 1, 2, 208, 9, 255, 255, 25 - , 1, 1, 216, 9, 255, 255, 26, 1, 1, 244, 9, 43, 1, 0, 0, 0, 16, 10, 255, 255, 0, 0, 0, 230, 9, 45, 1, 0, 0, 0 - , 244, 9, 255, 255, 0, 0, 0, 223, 9, 47, 1, 0, 0, 0, 230, 9, 255, 255, 0, 0, 0, 220, 9, 49, 1, 0, 0, 0, 223, 9 - , 53, 1, 0, 0, 0, 218, 9, 51, 1, 0, 0, 0, 220, 9, 255, 255, 0, 0, 0, 217, 9, 255, 255, 27, 1, 1, 218, 9, 255, 255 - , 0, 0, 0, 222, 9, 55, 1, 0, 0, 0, 223, 9, 255, 255, 0, 0, 0, 221, 9, 255, 255, 28, 1, 1, 222, 9, 255, 255, 0, 0 - , 0, 72, 10, 255, 255, 31, 1, 2, 128, 10, 59, 1, 33, 1, 2, 100, 10, 255, 255, 35, 1, 1, 128, 10, 255, 255, 36, 1, 1, 96 - , 11, 63, 1, 61, 1, 1, 64, 12, 79, 1, 62, 1, 1, 240, 10, 65, 1, 46, 1, 4, 96, 11, 73, 1, 50, 1, 4, 184, 10, 67 - , 1, 40, 1, 2, 240, 10, 69, 1, 42, 1, 2, 156, 10, 255, 255, 38, 1, 1, 184, 10, 255, 255, 39, 1, 1, 224, 10, 71, 1, 0 - , 0, 0, 240, 10, 255, 255, 0, 0, 0, 204, 10, 255, 255, 44, 1, 1, 224, 10, 255, 255, 45, 1, 1, 32, 11, 75, 1, 0, 0, 0 - , 96, 11, 77, 1, 0, 0, 0, 8, 11, 255, 255, 54, 1, 3, 32, 11, 255, 255, 57, 1, 3, 64, 11, 255, 255, 60, 1, 1, 96, 11 - , 255, 255, 63, 1, 1, 208, 11, 81, 1, 74, 1, 1, 64, 12, 107, 1, 75, 1, 1, 152, 11, 83, 1, 0, 0, 0, 208, 11, 91, 1 - , 0, 0, 0, 124, 11, 255, 255, 64, 1, 1, 152, 11, 85, 1, 65, 1, 1, 136, 11, 87, 1, 0, 0, 0, 152, 11, 89, 1, 0, 0 - , 0, 130, 11, 255, 255, 66, 1, 2, 136, 11, 255, 255, 68, 1, 2, 144, 11, 255, 255, 70, 1, 1, 152, 11, 255, 255, 71, 1, 1, 180 - , 11, 93, 1, 0, 0, 0, 208, 11, 255, 255, 0, 0, 0, 166, 11, 95, 1, 0, 0, 0, 180, 11, 255, 255, 0, 0, 0, 159, 11, 97 - , 1, 0, 0, 0, 166, 11, 255, 255, 0, 0, 0, 156, 11, 99, 1, 0, 0, 0, 159, 11, 103, 1, 0, 0, 0, 154, 11, 101, 1, 0 - , 0, 0, 156, 11, 255, 255, 0, 0, 0, 153, 11, 255, 255, 72, 1, 1, 154, 11, 255, 255, 0, 0, 0, 158, 11, 105, 1, 0, 0, 0 - , 159, 11, 255, 255, 0, 0, 0, 157, 11, 255, 255, 73, 1, 1, 158, 11, 255, 255, 0, 0, 0, 8, 12, 255, 255, 76, 1, 2, 64, 12 - , 109, 1, 78, 1, 2, 36, 12, 255, 255, 80, 1, 1, 64, 12, 255, 255, 81, 1, 1, 32, 13, 113, 1, 106, 1, 1, 0, 14, 129, 1 - , 107, 1, 1, 176, 12, 115, 1, 91, 1, 4, 32, 13, 123, 1, 95, 1, 4, 120, 12, 117, 1, 85, 1, 2, 176, 12, 119, 1, 87, 1 - , 2, 92, 12, 255, 255, 83, 1, 1, 120, 12, 255, 255, 84, 1, 1, 160, 12, 121, 1, 0, 0, 0, 176, 12, 255, 255, 0, 0, 0, 140 - , 12, 255, 255, 89, 1, 1, 160, 12, 255, 255, 90, 1, 1, 224, 12, 125, 1, 0, 0, 0, 32, 13, 127, 1, 0, 0, 0, 200, 12, 255 - , 255, 99, 1, 3, 224, 12, 255, 255, 102, 1, 3, 0, 13, 255, 255, 105, 1, 1, 32, 13, 255, 255, 108, 1, 1, 144, 13, 131, 1, 119 - , 1, 1, 0, 14, 157, 1, 120, 1, 1, 88, 13, 133, 1, 0, 0, 0, 144, 13, 141, 1, 0, 0, 0, 60, 13, 255, 255, 109, 1, 1 - , 88, 13, 135, 1, 110, 1, 1, 72, 13, 137, 1, 0, 0, 0, 88, 13, 139, 1, 0, 0, 0, 66, 13, 255, 255, 111, 1, 2, 72, 13 - , 255, 255, 113, 1, 2, 80, 13, 255, 255, 115, 1, 1, 88, 13, 255, 255, 116, 1, 1, 116, 13, 143, 1, 0, 0, 0, 144, 13, 255, 255 - , 0, 0, 0, 102, 13, 145, 1, 0, 0, 0, 116, 13, 255, 255, 0, 0, 0, 95, 13, 147, 1, 0, 0, 0, 102, 13, 255, 255, 0, 0 - , 0, 92, 13, 149, 1, 0, 0, 0, 95, 13, 153, 1, 0, 0, 0, 90, 13, 151, 1, 0, 0, 0, 92, 13, 255, 255, 0, 0, 0, 89 - , 13, 255, 255, 117, 1, 1, 90, 13, 255, 255, 0, 0, 0, 94, 13, 155, 1, 0, 0, 0, 95, 13, 255, 255, 0, 0, 0, 93, 13, 255 - , 255, 118, 1, 1, 94, 13, 255, 255, 0, 0, 0, 200, 13, 255, 255, 121, 1, 2, 0, 14, 159, 1, 123, 1, 2, 228, 13, 255, 255, 125 - , 1, 1, 0, 14, 255, 255, 126, 1, 1, 128, 17, 163, 1, 0, 0, 0, 63, 19, 9, 2, 0, 0, 0, 192, 15, 165, 1, 127, 1, 1 - , 128, 17, 215, 1, 172, 1, 1, 224, 14, 167, 1, 151, 1, 1, 192, 15, 183, 1, 152, 1, 1, 112, 14, 169, 1, 136, 1, 4, 224, 14 - , 177, 1, 140, 1, 4, 56, 14, 171, 1, 130, 1, 2, 112, 14, 173, 1, 132, 1, 2, 28, 14, 255, 255, 128, 1, 1, 56, 14, 255, 255 - , 129, 1, 1, 96, 14, 175, 1, 0, 0, 0, 112, 14, 255, 255, 0, 0, 0, 76, 14, 255, 255, 134, 1, 1, 96, 14, 255, 255, 135, 1 - , 1, 160, 14, 179, 1, 0, 0, 0, 224, 14, 181, 1, 0, 0, 0, 136, 14, 255, 255, 144, 1, 3, 160, 14, 255, 255, 147, 1, 3, 192 - , 14, 255, 255, 150, 1, 1, 224, 14, 255, 255, 153, 1, 1, 80, 15, 185, 1, 164, 1, 1, 192, 15, 211, 1, 165, 1, 1, 24, 15, 187 - , 1, 0, 0, 0, 80, 15, 195, 1, 0, 0, 0, 252, 14, 255, 255, 154, 1, 1, 24, 15, 189, 1, 155, 1, 1, 8, 15, 191, 1, 0 - , 0, 0, 24, 15, 193, 1, 0, 0, 0, 2, 15, 255, 255, 156, 1, 2, 8, 15, 255, 255, 158, 1, 2, 16, 15, 255, 255, 160, 1, 1 - , 24, 15, 255, 255, 161, 1, 1, 52, 15, 197, 1, 0, 0, 0, 80, 15, 255, 255, 0, 0, 0, 38, 15, 199, 1, 0, 0, 0, 52, 15 - , 255, 255, 0, 0, 0, 31, 15, 201, 1, 0, 0, 0, 38, 15, 255, 255, 0, 0, 0, 28, 15, 203, 1, 0, 0, 0, 31, 15, 207, 1 - , 0, 0, 0, 26, 15, 205, 1, 0, 0, 0, 28, 15, 255, 255, 0, 0, 0, 25, 15, 255, 255, 162, 1, 1, 26, 15, 255, 255, 0, 0 - , 0, 30, 15, 209, 1, 0, 0, 0, 31, 15, 255, 255, 0, 0, 0, 29, 15, 255, 255, 163, 1, 1, 30, 15, 255, 255, 0, 0, 0, 136 - , 15, 255, 255, 166, 1, 2, 192, 15, 213, 1, 168, 1, 2, 164, 15, 255, 255, 170, 1, 1, 192, 15, 255, 255, 171, 1, 1, 160, 16, 217 - , 1, 196, 1, 1, 128, 17, 233, 1, 197, 1, 1, 48, 16, 219, 1, 181, 1, 4, 160, 16, 227, 1, 185, 1, 4, 248, 15, 221, 1, 175 - , 1, 2, 48, 16, 223, 1, 177, 1, 2, 220, 15, 255, 255, 173, 1, 1, 248, 15, 255, 255, 174, 1, 1, 32, 16, 225, 1, 0, 0, 0 - , 48, 16, 255, 255, 0, 0, 0, 12, 16, 255, 255, 179, 1, 1, 32, 16, 255, 255, 180, 1, 1, 96, 16, 229, 1, 0, 0, 0, 160, 16 - , 231, 1, 0, 0, 0, 72, 16, 255, 255, 189, 1, 3, 96, 16, 255, 255, 192, 1, 3, 128, 16, 255, 255, 195, 1, 1, 160, 16, 255, 255 - , 198, 1, 1, 16, 17, 235, 1, 209, 1, 1, 128, 17, 5, 2, 210, 1, 1, 216, 16, 237, 1, 0, 0, 0, 16, 17, 245, 1, 0, 0 - , 0, 188, 16, 255, 255, 199, 1, 1, 216, 16, 239, 1, 200, 1, 1, 200, 16, 241, 1, 0, 0, 0, 216, 16, 243, 1, 0, 0, 0, 194 - , 16, 255, 255, 201, 1, 2, 200, 16, 255, 255, 203, 1, 2, 208, 16, 255, 255, 205, 1, 1, 216, 16, 255, 255, 206, 1, 1, 244, 16, 247 - , 1, 0, 0, 0, 16, 17, 255, 255, 0, 0, 0, 230, 16, 249, 1, 0, 0, 0, 244, 16, 255, 255, 0, 0, 0, 223, 16, 251, 1, 0 - , 0, 0, 230, 16, 255, 255, 0, 0, 0, 220, 16, 253, 1, 0, 0, 0, 223, 16, 1, 2, 0, 0, 0, 218, 16, 255, 1, 0, 0, 0 - , 220, 16, 255, 255, 0, 0, 0, 217, 16, 255, 255, 207, 1, 1, 218, 16, 255, 255, 0, 0, 0, 222, 16, 3, 2, 0, 0, 0, 223, 16 - , 255, 255, 0, 0, 0, 221, 16, 255, 255, 208, 1, 1, 222, 16, 255, 255, 0, 0, 0, 72, 17, 255, 255, 211, 1, 2, 128, 17, 7, 2 - , 213, 1, 2, 100, 17, 255, 255, 215, 1, 1, 128, 17, 255, 255, 216, 1, 1, 96, 18, 11, 2, 217, 1, 2, 63, 19, 27, 2, 219, 1 - , 2, 240, 17, 13, 2, 229, 1, 4, 96, 18, 21, 2, 233, 1, 4, 184, 17, 15, 2, 223, 1, 2, 240, 17, 17, 2, 225, 1, 2, 156 - , 17, 255, 255, 221, 1, 1, 184, 17, 255, 255, 222, 1, 1, 224, 17, 19, 2, 0, 0, 0, 240, 17, 255, 255, 0, 0, 0, 204, 17, 255 - , 255, 227, 1, 1, 224, 17, 255, 255, 228, 1, 1, 32, 18, 23, 2, 0, 0, 0, 96, 18, 25, 2, 0, 0, 0, 8, 18, 255, 255, 237 - , 1, 3, 32, 18, 255, 255, 240, 1, 3, 64, 18, 255, 255, 243, 1, 1, 96, 18, 255, 255, 244, 1, 1, 208, 18, 29, 2, 255, 1, 1 - , 63, 19, 55, 2, 0, 2, 1, 152, 18, 31, 2, 0, 0, 0, 208, 18, 39, 2, 0, 0, 0, 124, 18, 255, 255, 245, 1, 1, 152, 18 - , 33, 2, 246, 1, 1, 136, 18, 35, 2, 0, 0, 0, 152, 18, 37, 2, 0, 0, 0, 130, 18, 255, 255, 247, 1, 2, 136, 18, 255, 255 - , 249, 1, 2, 144, 18, 255, 255, 251, 1, 1, 152, 18, 255, 255, 252, 1, 1, 180, 18, 41, 2, 0, 0, 0, 208, 18, 255, 255, 0, 0 - , 0, 166, 18, 43, 2, 0, 0, 0, 180, 18, 255, 255, 0, 0, 0, 159, 18, 45, 2, 0, 0, 0, 166, 18, 255, 255, 0, 0, 0, 156 - , 18, 47, 2, 0, 0, 0, 159, 18, 51, 2, 0, 0, 0, 154, 18, 49, 2, 0, 0, 0, 156, 18, 255, 255, 0, 0, 0, 153, 18, 255 - , 255, 253, 1, 1, 154, 18, 255, 255, 0, 0, 0, 158, 18, 53, 2, 0, 0, 0, 159, 18, 255, 255, 0, 0, 0, 157, 18, 255, 255, 254 - , 1, 1, 158, 18, 255, 255, 0, 0, 0, 0, 19, 255, 255, 0, 0, 0, 63, 19, 57, 2, 0, 0, 0, 32, 19, 255, 255, 1, 2, 2 - , 63, 19, 59, 2, 3, 2, 1, 48, 19, 255, 255, 4, 2, 1, 63, 19, 255, 255, 5, 2, 1 + , 255, 255, 55, 0, 3, 24, 1, 37, 0, 0, 0, 0, 29, 1, 39, 0, 0, 0, 0, 16, 1, 255, 255, 58, 0, 1, 24, 1, 255, 255 + , 59, 0, 2, 27, 1, 41, 0, 0, 0, 0, 29, 1, 45, 0, 0, 0, 0, 26, 1, 43, 0, 0, 0, 0, 27, 1, 255, 255, 0, 0 + , 0, 25, 1, 255, 255, 61, 0, 1, 26, 1, 255, 255, 0, 0, 0, 28, 1, 255, 255, 0, 0, 0, 29, 1, 255, 255, 62, 0, 1, 128 + , 1, 49, 0, 0, 0, 0, 192, 1, 51, 0, 65, 0, 1, 79, 1, 255, 255, 63, 0, 1, 128, 1, 255, 255, 64, 0, 1, 160, 1, 255 + , 255, 66, 0, 1, 192, 1, 255, 255, 67, 0, 1, 160, 2, 55, 0, 92, 0, 1, 128, 3, 71, 0, 93, 0, 1, 48, 2, 57, 0, 77 + , 0, 4, 160, 2, 65, 0, 81, 0, 4, 248, 1, 59, 0, 71, 0, 2, 48, 2, 61, 0, 73, 0, 2, 220, 1, 255, 255, 69, 0, 1 + , 248, 1, 255, 255, 70, 0, 1, 32, 2, 63, 0, 0, 0, 0, 48, 2, 255, 255, 0, 0, 0, 12, 2, 255, 255, 75, 0, 1, 32, 2 + , 255, 255, 76, 0, 1, 96, 2, 67, 0, 0, 0, 0, 160, 2, 69, 0, 0, 0, 0, 72, 2, 255, 255, 85, 0, 3, 96, 2, 255, 255 + , 88, 0, 3, 128, 2, 255, 255, 91, 0, 1, 160, 2, 255, 255, 94, 0, 1, 16, 3, 73, 0, 105, 0, 1, 128, 3, 99, 0, 106, 0 + , 1, 216, 2, 75, 0, 0, 0, 0, 16, 3, 83, 0, 0, 0, 0, 188, 2, 255, 255, 95, 0, 1, 216, 2, 77, 0, 96, 0, 1, 200 + , 2, 79, 0, 0, 0, 0, 216, 2, 81, 0, 0, 0, 0, 194, 2, 255, 255, 97, 0, 2, 200, 2, 255, 255, 99, 0, 2, 208, 2, 255 + , 255, 101, 0, 1, 216, 2, 255, 255, 102, 0, 1, 244, 2, 85, 0, 0, 0, 0, 16, 3, 255, 255, 0, 0, 0, 230, 2, 87, 0, 0 + , 0, 0, 244, 2, 255, 255, 0, 0, 0, 223, 2, 89, 0, 0, 0, 0, 230, 2, 255, 255, 0, 0, 0, 220, 2, 91, 0, 0, 0, 0 + , 223, 2, 95, 0, 0, 0, 0, 218, 2, 93, 0, 0, 0, 0, 220, 2, 255, 255, 0, 0, 0, 217, 2, 255, 255, 103, 0, 1, 218, 2 + , 255, 255, 0, 0, 0, 222, 2, 97, 0, 0, 0, 0, 223, 2, 255, 255, 0, 0, 0, 221, 2, 255, 255, 104, 0, 1, 222, 2, 255, 255 + , 0, 0, 0, 72, 3, 255, 255, 107, 0, 2, 128, 3, 101, 0, 109, 0, 2, 100, 3, 255, 255, 111, 0, 1, 128, 3, 255, 255, 112, 0 + , 1, 0, 7, 105, 0, 0, 0, 0, 192, 8, 207, 0, 203, 0, 1, 64, 5, 107, 0, 113, 0, 1, 0, 7, 157, 0, 158, 0, 1, 96 + , 4, 109, 0, 137, 0, 1, 64, 5, 125, 0, 138, 0, 1, 240, 3, 111, 0, 122, 0, 4, 96, 4, 119, 0, 126, 0, 4, 184, 3, 113 + , 0, 116, 0, 2, 240, 3, 115, 0, 118, 0, 2, 156, 3, 255, 255, 114, 0, 1, 184, 3, 255, 255, 115, 0, 1, 224, 3, 117, 0, 0 + , 0, 0, 240, 3, 255, 255, 0, 0, 0, 204, 3, 255, 255, 120, 0, 1, 224, 3, 255, 255, 121, 0, 1, 32, 4, 121, 0, 0, 0, 0 + , 96, 4, 123, 0, 0, 0, 0, 8, 4, 255, 255, 130, 0, 3, 32, 4, 255, 255, 133, 0, 3, 64, 4, 255, 255, 136, 0, 1, 96, 4 + , 255, 255, 139, 0, 1, 208, 4, 127, 0, 150, 0, 1, 64, 5, 153, 0, 151, 0, 1, 152, 4, 129, 0, 0, 0, 0, 208, 4, 137, 0 + , 0, 0, 0, 124, 4, 255, 255, 140, 0, 1, 152, 4, 131, 0, 141, 0, 1, 136, 4, 133, 0, 0, 0, 0, 152, 4, 135, 0, 0, 0 + , 0, 130, 4, 255, 255, 142, 0, 2, 136, 4, 255, 255, 144, 0, 2, 144, 4, 255, 255, 146, 0, 1, 152, 4, 255, 255, 147, 0, 1, 180 + , 4, 139, 0, 0, 0, 0, 208, 4, 255, 255, 0, 0, 0, 166, 4, 141, 0, 0, 0, 0, 180, 4, 255, 255, 0, 0, 0, 159, 4, 143 + , 0, 0, 0, 0, 166, 4, 255, 255, 0, 0, 0, 156, 4, 145, 0, 0, 0, 0, 159, 4, 149, 0, 0, 0, 0, 154, 4, 147, 0, 0 + , 0, 0, 156, 4, 255, 255, 0, 0, 0, 153, 4, 255, 255, 148, 0, 1, 154, 4, 255, 255, 0, 0, 0, 158, 4, 151, 0, 0, 0, 0 + , 159, 4, 255, 255, 0, 0, 0, 157, 4, 255, 255, 149, 0, 1, 158, 4, 255, 255, 0, 0, 0, 8, 5, 255, 255, 152, 0, 2, 64, 5 + , 155, 0, 154, 0, 2, 36, 5, 255, 255, 156, 0, 1, 64, 5, 255, 255, 157, 0, 1, 32, 6, 159, 0, 182, 0, 1, 0, 7, 175, 0 + , 183, 0, 1, 176, 5, 161, 0, 167, 0, 4, 32, 6, 169, 0, 171, 0, 4, 120, 5, 163, 0, 161, 0, 2, 176, 5, 165, 0, 163, 0 + , 2, 92, 5, 255, 255, 159, 0, 1, 120, 5, 255, 255, 160, 0, 1, 160, 5, 167, 0, 0, 0, 0, 176, 5, 255, 255, 0, 0, 0, 140 + , 5, 255, 255, 165, 0, 1, 160, 5, 255, 255, 166, 0, 1, 224, 5, 171, 0, 0, 0, 0, 32, 6, 173, 0, 0, 0, 0, 200, 5, 255 + , 255, 175, 0, 3, 224, 5, 255, 255, 178, 0, 3, 0, 6, 255, 255, 181, 0, 1, 32, 6, 255, 255, 184, 0, 1, 144, 6, 177, 0, 195 + , 0, 1, 0, 7, 203, 0, 196, 0, 1, 88, 6, 179, 0, 0, 0, 0, 144, 6, 187, 0, 0, 0, 0, 60, 6, 255, 255, 185, 0, 1 + , 88, 6, 181, 0, 186, 0, 1, 72, 6, 183, 0, 0, 0, 0, 88, 6, 185, 0, 0, 0, 0, 66, 6, 255, 255, 187, 0, 2, 72, 6 + , 255, 255, 189, 0, 2, 80, 6, 255, 255, 191, 0, 1, 88, 6, 255, 255, 192, 0, 1, 116, 6, 189, 0, 0, 0, 0, 144, 6, 255, 255 + , 0, 0, 0, 102, 6, 191, 0, 0, 0, 0, 116, 6, 255, 255, 0, 0, 0, 95, 6, 193, 0, 0, 0, 0, 102, 6, 255, 255, 0, 0 + , 0, 92, 6, 195, 0, 0, 0, 0, 95, 6, 199, 0, 0, 0, 0, 90, 6, 197, 0, 0, 0, 0, 92, 6, 255, 255, 0, 0, 0, 89 + , 6, 255, 255, 193, 0, 1, 90, 6, 255, 255, 0, 0, 0, 94, 6, 201, 0, 0, 0, 0, 95, 6, 255, 255, 0, 0, 0, 93, 6, 255 + , 255, 194, 0, 1, 94, 6, 255, 255, 0, 0, 0, 200, 6, 255, 255, 197, 0, 2, 0, 7, 205, 0, 199, 0, 2, 228, 6, 255, 255, 201 + , 0, 1, 0, 7, 255, 255, 202, 0, 1, 224, 7, 209, 0, 227, 0, 1, 192, 8, 225, 0, 228, 0, 1, 112, 7, 211, 0, 212, 0, 4 + , 224, 7, 219, 0, 216, 0, 4, 56, 7, 213, 0, 206, 0, 2, 112, 7, 215, 0, 208, 0, 2, 28, 7, 255, 255, 204, 0, 1, 56, 7 + , 255, 255, 205, 0, 1, 96, 7, 217, 0, 0, 0, 0, 112, 7, 255, 255, 0, 0, 0, 76, 7, 255, 255, 210, 0, 1, 96, 7, 255, 255 + , 211, 0, 1, 160, 7, 221, 0, 0, 0, 0, 224, 7, 223, 0, 0, 0, 0, 136, 7, 255, 255, 220, 0, 3, 160, 7, 255, 255, 223, 0 + , 3, 192, 7, 255, 255, 226, 0, 1, 224, 7, 255, 255, 229, 0, 1, 80, 8, 227, 0, 240, 0, 1, 192, 8, 253, 0, 241, 0, 1, 24 + , 8, 229, 0, 0, 0, 0, 80, 8, 237, 0, 0, 0, 0, 252, 7, 255, 255, 230, 0, 1, 24, 8, 231, 0, 231, 0, 1, 8, 8, 233 + , 0, 0, 0, 0, 24, 8, 235, 0, 0, 0, 0, 2, 8, 255, 255, 232, 0, 2, 8, 8, 255, 255, 234, 0, 2, 16, 8, 255, 255, 236 + , 0, 1, 24, 8, 255, 255, 237, 0, 1, 52, 8, 239, 0, 0, 0, 0, 80, 8, 255, 255, 0, 0, 0, 38, 8, 241, 0, 0, 0, 0 + , 52, 8, 255, 255, 0, 0, 0, 31, 8, 243, 0, 0, 0, 0, 38, 8, 255, 255, 0, 0, 0, 28, 8, 245, 0, 0, 0, 0, 31, 8 + , 249, 0, 0, 0, 0, 26, 8, 247, 0, 0, 0, 0, 28, 8, 255, 255, 0, 0, 0, 25, 8, 255, 255, 238, 0, 1, 26, 8, 255, 255 + , 0, 0, 0, 30, 8, 251, 0, 0, 0, 0, 31, 8, 255, 255, 0, 0, 0, 29, 8, 255, 255, 239, 0, 1, 30, 8, 255, 255, 0, 0 + , 0, 136, 8, 255, 255, 242, 0, 2, 192, 8, 255, 0, 244, 0, 2, 164, 8, 255, 255, 246, 0, 1, 192, 8, 255, 255, 247, 0, 1, 0 + , 14, 3, 1, 0, 0, 0, 63, 19, 157, 1, 0, 0, 0, 64, 12, 5, 1, 0, 0, 0, 0, 14, 107, 1, 82, 1, 1, 128, 10, 7 + , 1, 248, 0, 1, 64, 12, 57, 1, 37, 1, 1, 160, 9, 9, 1, 16, 1, 1, 128, 10, 25, 1, 17, 1, 1, 48, 9, 11, 1, 1 + , 1, 4, 160, 9, 19, 1, 5, 1, 4, 248, 8, 13, 1, 251, 0, 2, 48, 9, 15, 1, 253, 0, 2, 220, 8, 255, 255, 249, 0, 1 + , 248, 8, 255, 255, 250, 0, 1, 32, 9, 17, 1, 0, 0, 0, 48, 9, 255, 255, 0, 0, 0, 12, 9, 255, 255, 255, 0, 1, 32, 9 + , 255, 255, 0, 1, 1, 96, 9, 21, 1, 0, 0, 0, 160, 9, 23, 1, 0, 0, 0, 72, 9, 255, 255, 9, 1, 3, 96, 9, 255, 255 + , 12, 1, 3, 128, 9, 255, 255, 15, 1, 1, 160, 9, 255, 255, 18, 1, 1, 16, 10, 27, 1, 29, 1, 1, 128, 10, 53, 1, 30, 1 + , 1, 216, 9, 29, 1, 0, 0, 0, 16, 10, 37, 1, 0, 0, 0, 188, 9, 255, 255, 19, 1, 1, 216, 9, 31, 1, 20, 1, 1, 200 + , 9, 33, 1, 0, 0, 0, 216, 9, 35, 1, 0, 0, 0, 194, 9, 255, 255, 21, 1, 2, 200, 9, 255, 255, 23, 1, 2, 208, 9, 255 + , 255, 25, 1, 1, 216, 9, 255, 255, 26, 1, 1, 244, 9, 39, 1, 0, 0, 0, 16, 10, 255, 255, 0, 0, 0, 230, 9, 41, 1, 0 + , 0, 0, 244, 9, 255, 255, 0, 0, 0, 223, 9, 43, 1, 0, 0, 0, 230, 9, 255, 255, 0, 0, 0, 220, 9, 45, 1, 0, 0, 0 + , 223, 9, 49, 1, 0, 0, 0, 218, 9, 47, 1, 0, 0, 0, 220, 9, 255, 255, 0, 0, 0, 217, 9, 255, 255, 27, 1, 1, 218, 9 + , 255, 255, 0, 0, 0, 222, 9, 51, 1, 0, 0, 0, 223, 9, 255, 255, 0, 0, 0, 221, 9, 255, 255, 28, 1, 1, 222, 9, 255, 255 + , 0, 0, 0, 72, 10, 255, 255, 31, 1, 2, 128, 10, 55, 1, 33, 1, 2, 100, 10, 255, 255, 35, 1, 1, 128, 10, 255, 255, 36, 1 + , 1, 96, 11, 59, 1, 61, 1, 1, 64, 12, 75, 1, 62, 1, 1, 240, 10, 61, 1, 46, 1, 4, 96, 11, 69, 1, 50, 1, 4, 184 + , 10, 63, 1, 40, 1, 2, 240, 10, 65, 1, 42, 1, 2, 156, 10, 255, 255, 38, 1, 1, 184, 10, 255, 255, 39, 1, 1, 224, 10, 67 + , 1, 0, 0, 0, 240, 10, 255, 255, 0, 0, 0, 204, 10, 255, 255, 44, 1, 1, 224, 10, 255, 255, 45, 1, 1, 32, 11, 71, 1, 0 + , 0, 0, 96, 11, 73, 1, 0, 0, 0, 8, 11, 255, 255, 54, 1, 3, 32, 11, 255, 255, 57, 1, 3, 64, 11, 255, 255, 60, 1, 1 + , 96, 11, 255, 255, 63, 1, 1, 208, 11, 77, 1, 74, 1, 1, 64, 12, 103, 1, 75, 1, 1, 152, 11, 79, 1, 0, 0, 0, 208, 11 + , 87, 1, 0, 0, 0, 124, 11, 255, 255, 64, 1, 1, 152, 11, 81, 1, 65, 1, 1, 136, 11, 83, 1, 0, 0, 0, 152, 11, 85, 1 + , 0, 0, 0, 130, 11, 255, 255, 66, 1, 2, 136, 11, 255, 255, 68, 1, 2, 144, 11, 255, 255, 70, 1, 1, 152, 11, 255, 255, 71, 1 + , 1, 180, 11, 89, 1, 0, 0, 0, 208, 11, 255, 255, 0, 0, 0, 166, 11, 91, 1, 0, 0, 0, 180, 11, 255, 255, 0, 0, 0, 159 + , 11, 93, 1, 0, 0, 0, 166, 11, 255, 255, 0, 0, 0, 156, 11, 95, 1, 0, 0, 0, 159, 11, 99, 1, 0, 0, 0, 154, 11, 97 + , 1, 0, 0, 0, 156, 11, 255, 255, 0, 0, 0, 153, 11, 255, 255, 72, 1, 1, 154, 11, 255, 255, 0, 0, 0, 158, 11, 101, 1, 0 + , 0, 0, 159, 11, 255, 255, 0, 0, 0, 157, 11, 255, 255, 73, 1, 1, 158, 11, 255, 255, 0, 0, 0, 8, 12, 255, 255, 76, 1, 2 + , 64, 12, 105, 1, 78, 1, 2, 36, 12, 255, 255, 80, 1, 1, 64, 12, 255, 255, 81, 1, 1, 32, 13, 109, 1, 106, 1, 1, 0, 14 + , 125, 1, 107, 1, 1, 176, 12, 111, 1, 91, 1, 4, 32, 13, 119, 1, 95, 1, 4, 120, 12, 113, 1, 85, 1, 2, 176, 12, 115, 1 + , 87, 1, 2, 92, 12, 255, 255, 83, 1, 1, 120, 12, 255, 255, 84, 1, 1, 160, 12, 117, 1, 0, 0, 0, 176, 12, 255, 255, 0, 0 + , 0, 140, 12, 255, 255, 89, 1, 1, 160, 12, 255, 255, 90, 1, 1, 224, 12, 121, 1, 0, 0, 0, 32, 13, 123, 1, 0, 0, 0, 200 + , 12, 255, 255, 99, 1, 3, 224, 12, 255, 255, 102, 1, 3, 0, 13, 255, 255, 105, 1, 1, 32, 13, 255, 255, 108, 1, 1, 144, 13, 127 + , 1, 119, 1, 1, 0, 14, 153, 1, 120, 1, 1, 88, 13, 129, 1, 0, 0, 0, 144, 13, 137, 1, 0, 0, 0, 60, 13, 255, 255, 109 + , 1, 1, 88, 13, 131, 1, 110, 1, 1, 72, 13, 133, 1, 0, 0, 0, 88, 13, 135, 1, 0, 0, 0, 66, 13, 255, 255, 111, 1, 2 + , 72, 13, 255, 255, 113, 1, 2, 80, 13, 255, 255, 115, 1, 1, 88, 13, 255, 255, 116, 1, 1, 116, 13, 139, 1, 0, 0, 0, 144, 13 + , 255, 255, 0, 0, 0, 102, 13, 141, 1, 0, 0, 0, 116, 13, 255, 255, 0, 0, 0, 95, 13, 143, 1, 0, 0, 0, 102, 13, 255, 255 + , 0, 0, 0, 92, 13, 145, 1, 0, 0, 0, 95, 13, 149, 1, 0, 0, 0, 90, 13, 147, 1, 0, 0, 0, 92, 13, 255, 255, 0, 0 + , 0, 89, 13, 255, 255, 117, 1, 1, 90, 13, 255, 255, 0, 0, 0, 94, 13, 151, 1, 0, 0, 0, 95, 13, 255, 255, 0, 0, 0, 93 + , 13, 255, 255, 118, 1, 1, 94, 13, 255, 255, 0, 0, 0, 200, 13, 255, 255, 121, 1, 2, 0, 14, 155, 1, 123, 1, 2, 228, 13, 255 + , 255, 125, 1, 1, 0, 14, 255, 255, 126, 1, 1, 128, 17, 159, 1, 0, 0, 0, 63, 19, 5, 2, 0, 0, 0, 192, 15, 161, 1, 127 + , 1, 1, 128, 17, 211, 1, 172, 1, 1, 224, 14, 163, 1, 151, 1, 1, 192, 15, 179, 1, 152, 1, 1, 112, 14, 165, 1, 136, 1, 4 + , 224, 14, 173, 1, 140, 1, 4, 56, 14, 167, 1, 130, 1, 2, 112, 14, 169, 1, 132, 1, 2, 28, 14, 255, 255, 128, 1, 1, 56, 14 + , 255, 255, 129, 1, 1, 96, 14, 171, 1, 0, 0, 0, 112, 14, 255, 255, 0, 0, 0, 76, 14, 255, 255, 134, 1, 1, 96, 14, 255, 255 + , 135, 1, 1, 160, 14, 175, 1, 0, 0, 0, 224, 14, 177, 1, 0, 0, 0, 136, 14, 255, 255, 144, 1, 3, 160, 14, 255, 255, 147, 1 + , 3, 192, 14, 255, 255, 150, 1, 1, 224, 14, 255, 255, 153, 1, 1, 80, 15, 181, 1, 164, 1, 1, 192, 15, 207, 1, 165, 1, 1, 24 + , 15, 183, 1, 0, 0, 0, 80, 15, 191, 1, 0, 0, 0, 252, 14, 255, 255, 154, 1, 1, 24, 15, 185, 1, 155, 1, 1, 8, 15, 187 + , 1, 0, 0, 0, 24, 15, 189, 1, 0, 0, 0, 2, 15, 255, 255, 156, 1, 2, 8, 15, 255, 255, 158, 1, 2, 16, 15, 255, 255, 160 + , 1, 1, 24, 15, 255, 255, 161, 1, 1, 52, 15, 193, 1, 0, 0, 0, 80, 15, 255, 255, 0, 0, 0, 38, 15, 195, 1, 0, 0, 0 + , 52, 15, 255, 255, 0, 0, 0, 31, 15, 197, 1, 0, 0, 0, 38, 15, 255, 255, 0, 0, 0, 28, 15, 199, 1, 0, 0, 0, 31, 15 + , 203, 1, 0, 0, 0, 26, 15, 201, 1, 0, 0, 0, 28, 15, 255, 255, 0, 0, 0, 25, 15, 255, 255, 162, 1, 1, 26, 15, 255, 255 + , 0, 0, 0, 30, 15, 205, 1, 0, 0, 0, 31, 15, 255, 255, 0, 0, 0, 29, 15, 255, 255, 163, 1, 1, 30, 15, 255, 255, 0, 0 + , 0, 136, 15, 255, 255, 166, 1, 2, 192, 15, 209, 1, 168, 1, 2, 164, 15, 255, 255, 170, 1, 1, 192, 15, 255, 255, 171, 1, 1, 160 + , 16, 213, 1, 196, 1, 1, 128, 17, 229, 1, 197, 1, 1, 48, 16, 215, 1, 181, 1, 4, 160, 16, 223, 1, 185, 1, 4, 248, 15, 217 + , 1, 175, 1, 2, 48, 16, 219, 1, 177, 1, 2, 220, 15, 255, 255, 173, 1, 1, 248, 15, 255, 255, 174, 1, 1, 32, 16, 221, 1, 0 + , 0, 0, 48, 16, 255, 255, 0, 0, 0, 12, 16, 255, 255, 179, 1, 1, 32, 16, 255, 255, 180, 1, 1, 96, 16, 225, 1, 0, 0, 0 + , 160, 16, 227, 1, 0, 0, 0, 72, 16, 255, 255, 189, 1, 3, 96, 16, 255, 255, 192, 1, 3, 128, 16, 255, 255, 195, 1, 1, 160, 16 + , 255, 255, 198, 1, 1, 16, 17, 231, 1, 209, 1, 1, 128, 17, 1, 2, 210, 1, 1, 216, 16, 233, 1, 0, 0, 0, 16, 17, 241, 1 + , 0, 0, 0, 188, 16, 255, 255, 199, 1, 1, 216, 16, 235, 1, 200, 1, 1, 200, 16, 237, 1, 0, 0, 0, 216, 16, 239, 1, 0, 0 + , 0, 194, 16, 255, 255, 201, 1, 2, 200, 16, 255, 255, 203, 1, 2, 208, 16, 255, 255, 205, 1, 1, 216, 16, 255, 255, 206, 1, 1, 244 + , 16, 243, 1, 0, 0, 0, 16, 17, 255, 255, 0, 0, 0, 230, 16, 245, 1, 0, 0, 0, 244, 16, 255, 255, 0, 0, 0, 223, 16, 247 + , 1, 0, 0, 0, 230, 16, 255, 255, 0, 0, 0, 220, 16, 249, 1, 0, 0, 0, 223, 16, 253, 1, 0, 0, 0, 218, 16, 251, 1, 0 + , 0, 0, 220, 16, 255, 255, 0, 0, 0, 217, 16, 255, 255, 207, 1, 1, 218, 16, 255, 255, 0, 0, 0, 222, 16, 255, 1, 0, 0, 0 + , 223, 16, 255, 255, 0, 0, 0, 221, 16, 255, 255, 208, 1, 1, 222, 16, 255, 255, 0, 0, 0, 72, 17, 255, 255, 211, 1, 2, 128, 17 + , 3, 2, 213, 1, 2, 100, 17, 255, 255, 215, 1, 1, 128, 17, 255, 255, 216, 1, 1, 96, 18, 7, 2, 217, 1, 2, 63, 19, 23, 2 + , 219, 1, 2, 240, 17, 9, 2, 229, 1, 4, 96, 18, 17, 2, 233, 1, 4, 184, 17, 11, 2, 223, 1, 2, 240, 17, 13, 2, 225, 1 + , 2, 156, 17, 255, 255, 221, 1, 1, 184, 17, 255, 255, 222, 1, 1, 224, 17, 15, 2, 0, 0, 0, 240, 17, 255, 255, 0, 0, 0, 204 + , 17, 255, 255, 227, 1, 1, 224, 17, 255, 255, 228, 1, 1, 32, 18, 19, 2, 0, 0, 0, 96, 18, 21, 2, 0, 0, 0, 8, 18, 255 + , 255, 237, 1, 3, 32, 18, 255, 255, 240, 1, 3, 64, 18, 255, 255, 243, 1, 1, 96, 18, 255, 255, 244, 1, 1, 208, 18, 25, 2, 255 + , 1, 1, 63, 19, 51, 2, 0, 2, 1, 152, 18, 27, 2, 0, 0, 0, 208, 18, 35, 2, 0, 0, 0, 124, 18, 255, 255, 245, 1, 1 + , 152, 18, 29, 2, 246, 1, 1, 136, 18, 31, 2, 0, 0, 0, 152, 18, 33, 2, 0, 0, 0, 130, 18, 255, 255, 247, 1, 2, 136, 18 + , 255, 255, 249, 1, 2, 144, 18, 255, 255, 251, 1, 1, 152, 18, 255, 255, 252, 1, 1, 180, 18, 37, 2, 0, 0, 0, 208, 18, 255, 255 + , 0, 0, 0, 166, 18, 39, 2, 0, 0, 0, 180, 18, 255, 255, 0, 0, 0, 159, 18, 41, 2, 0, 0, 0, 166, 18, 255, 255, 0, 0 + , 0, 156, 18, 43, 2, 0, 0, 0, 159, 18, 47, 2, 0, 0, 0, 154, 18, 45, 2, 0, 0, 0, 156, 18, 255, 255, 0, 0, 0, 153 + , 18, 255, 255, 253, 1, 1, 154, 18, 255, 255, 0, 0, 0, 158, 18, 49, 2, 0, 0, 0, 159, 18, 255, 255, 0, 0, 0, 157, 18, 255 + , 255, 254, 1, 1, 158, 18, 255, 255, 0, 0, 0, 0, 19, 255, 255, 0, 0, 0, 63, 19, 53, 2, 0, 0, 0, 32, 19, 255, 255, 1 + , 2, 2, 63, 19, 55, 2, 3, 2, 1, 48, 19, 255, 255, 4, 2, 1, 63, 19, 255, 255, 5, 2, 1 }, new ushort[] { // Control tree node indicies 0, 17, 18, 1, 30, 42, 31, 43, 19, 32, 33, 37, 2, 44, 45, 49, 19, 32, 33, 37, 2, 44, 45, 49, 34, 35, 36, 46, 47, 48 , 34, 35, 36, 46, 47, 48, 20, 3, 20, 3, 21, 39, 4, 51, 21, 39, 4, 51, 38, 50, 38, 50, 22, 23, 5, 22, 23, 5, 24, 25 - , 25, 26, 27, 28, 28, 29, 40, 41, 6, 52, 52, 53, 65, 53, 65, 66, 66, 54, 69, 70, 71, 54, 69, 70, 71, 67, 68, 72, 67, 68 - , 72, 55, 56, 56, 73, 74, 74, 57, 58, 57, 58, 59, 60, 61, 62, 63, 63, 64, 75, 64, 75, 76, 76, 7, 77, 77, 78, 90, 78, 90 + , 6, 26, 27, 28, 28, 29, 40, 41, 7, 52, 52, 53, 65, 53, 65, 66, 66, 54, 69, 70, 71, 54, 69, 70, 71, 67, 68, 72, 67, 68 + , 72, 55, 56, 56, 73, 74, 74, 57, 58, 57, 58, 59, 60, 61, 62, 63, 63, 64, 75, 64, 75, 76, 76, 8, 77, 77, 78, 90, 78, 90 , 91, 91, 79, 94, 95, 96, 79, 94, 95, 96, 92, 93, 97, 92, 93, 97, 80, 81, 81, 98, 99, 99, 82, 83, 82, 83, 84, 85, 86, 87 - , 88, 88, 89, 100, 89, 100, 101, 101, 8, 102, 102, 103, 115, 103, 115, 116, 116, 104, 119, 120, 121, 104, 119, 120, 121, 117, 118, 122, 117, 118 - , 122, 105, 106, 106, 123, 124, 124, 107, 108, 107, 108, 109, 110, 111, 112, 113, 113, 114, 125, 114, 125, 126, 126, 9, 127, 127, 128, 140, 128, 140 + , 88, 88, 89, 100, 89, 100, 101, 101, 9, 102, 102, 103, 115, 103, 115, 116, 116, 104, 119, 120, 121, 104, 119, 120, 121, 117, 118, 122, 117, 118 + , 122, 105, 106, 106, 123, 124, 124, 107, 108, 107, 108, 109, 110, 111, 112, 113, 113, 114, 125, 114, 125, 126, 126, 10, 127, 127, 128, 140, 128, 140 , 141, 141, 129, 144, 145, 146, 129, 144, 145, 146, 142, 143, 147, 142, 143, 147, 130, 131, 131, 148, 149, 149, 132, 133, 132, 133, 134, 135, 136, 137 - , 138, 138, 139, 150, 139, 150, 151, 151, 10, 152, 152, 153, 165, 153, 165, 166, 166, 154, 169, 170, 171, 154, 169, 170, 171, 167, 168, 172, 167, 168 - , 172, 155, 156, 156, 173, 174, 174, 157, 158, 157, 158, 159, 160, 161, 162, 163, 163, 164, 175, 164, 175, 176, 176, 11, 177, 177, 178, 190, 178, 190 + , 138, 138, 139, 150, 139, 150, 151, 151, 11, 152, 152, 153, 165, 153, 165, 166, 166, 154, 169, 170, 171, 154, 169, 170, 171, 167, 168, 172, 167, 168 + , 172, 155, 156, 156, 173, 174, 174, 157, 158, 157, 158, 159, 160, 161, 162, 163, 163, 164, 175, 164, 175, 176, 176, 12, 177, 177, 178, 190, 178, 190 , 191, 191, 179, 194, 195, 196, 179, 194, 195, 196, 192, 193, 197, 192, 193, 197, 180, 181, 181, 198, 199, 199, 182, 183, 182, 183, 184, 185, 186, 187 - , 188, 188, 189, 200, 189, 200, 201, 201, 12, 202, 202, 203, 215, 203, 215, 216, 216, 204, 219, 220, 221, 204, 219, 220, 221, 217, 218, 222, 217, 218 - , 222, 205, 206, 206, 223, 224, 224, 207, 208, 207, 208, 209, 210, 211, 212, 213, 213, 214, 225, 214, 225, 226, 226, 13, 227, 227, 228, 240, 228, 240 + , 188, 188, 189, 200, 189, 200, 201, 201, 13, 202, 202, 203, 215, 203, 215, 216, 216, 204, 219, 220, 221, 204, 219, 220, 221, 217, 218, 222, 217, 218 + , 222, 205, 206, 206, 223, 224, 224, 207, 208, 207, 208, 209, 210, 211, 212, 213, 213, 214, 225, 214, 225, 226, 226, 14, 227, 227, 228, 240, 228, 240 , 241, 241, 229, 244, 245, 246, 229, 244, 245, 246, 242, 243, 247, 242, 243, 247, 230, 231, 231, 248, 249, 249, 232, 233, 232, 233, 234, 235, 236, 237 - , 238, 238, 239, 250, 239, 250, 251, 251, 14, 252, 252, 253, 265, 253, 265, 266, 266, 254, 269, 270, 271, 254, 269, 270, 271, 267, 268, 272, 267, 268 - , 272, 255, 256, 256, 273, 274, 274, 257, 258, 257, 258, 259, 260, 261, 262, 263, 263, 264, 275, 264, 275, 276, 276, 15, 281, 15, 281, 277, 277, 278 + , 238, 238, 239, 250, 239, 250, 251, 251, 15, 252, 252, 253, 265, 253, 265, 266, 266, 254, 269, 270, 271, 254, 269, 270, 271, 267, 268, 272, 267, 268 + , 272, 255, 256, 256, 273, 274, 274, 257, 258, 257, 258, 259, 260, 261, 262, 263, 263, 264, 275, 264, 275, 276, 276, 16, 281, 16, 281, 277, 277, 278 , 290, 278, 290, 291, 291, 279, 294, 295, 296, 279, 294, 295, 296, 292, 293, 297, 292, 293, 297, 280, 298, 299, 299, 282, 283, 282, 283, 284, 285, 286 - , 287, 288, 288, 289, 300, 289, 301, 301, 16 + , 287, 288, 288, 289, 300, 289, 301, 301 }); builder.Finish(); @@ -1591,11 +1590,31 @@ private UnityEngine.InputSystem.Controls.TouchPressControl Initialize_ctrlTouchs return ctrlTouchscreenpress; } + private UnityEngine.InputSystem.Controls.IntegerControl Initialize_ctrlTouchscreendisplayIndex(InternedString kIntegerLayout, InputControl parent) + { + var ctrlTouchscreendisplayIndex = new UnityEngine.InputSystem.Controls.IntegerControl(); + ctrlTouchscreendisplayIndex.Setup() + .At(this, 6) + .WithParent(parent) + .WithName("displayIndex") + .WithDisplayName("Display Index") + .WithLayout(kIntegerLayout) + .WithStateBlock(new InputStateBlock + { + format = new FourCC(1113150533), + byteOffset = 34, + bitOffset = 0, + sizeInBits = 8 + }) + .Finish(); + return ctrlTouchscreendisplayIndex; + } + private UnityEngine.InputSystem.Controls.TouchControl Initialize_ctrlTouchscreentouch0(InternedString kTouchLayout, InputControl parent) { var ctrlTouchscreentouch0 = new UnityEngine.InputSystem.Controls.TouchControl(); ctrlTouchscreentouch0.Setup() - .At(this, 6) + .At(this, 7) .WithParent(parent) .WithChildren(52, 13) .WithName("touch0") @@ -1616,7 +1635,7 @@ private UnityEngine.InputSystem.Controls.TouchControl Initialize_ctrlTouchscreen { var ctrlTouchscreentouch1 = new UnityEngine.InputSystem.Controls.TouchControl(); ctrlTouchscreentouch1.Setup() - .At(this, 7) + .At(this, 8) .WithParent(parent) .WithChildren(77, 13) .WithName("touch1") @@ -1637,7 +1656,7 @@ private UnityEngine.InputSystem.Controls.TouchControl Initialize_ctrlTouchscreen { var ctrlTouchscreentouch2 = new UnityEngine.InputSystem.Controls.TouchControl(); ctrlTouchscreentouch2.Setup() - .At(this, 8) + .At(this, 9) .WithParent(parent) .WithChildren(102, 13) .WithName("touch2") @@ -1658,7 +1677,7 @@ private UnityEngine.InputSystem.Controls.TouchControl Initialize_ctrlTouchscreen { var ctrlTouchscreentouch3 = new UnityEngine.InputSystem.Controls.TouchControl(); ctrlTouchscreentouch3.Setup() - .At(this, 9) + .At(this, 10) .WithParent(parent) .WithChildren(127, 13) .WithName("touch3") @@ -1679,7 +1698,7 @@ private UnityEngine.InputSystem.Controls.TouchControl Initialize_ctrlTouchscreen { var ctrlTouchscreentouch4 = new UnityEngine.InputSystem.Controls.TouchControl(); ctrlTouchscreentouch4.Setup() - .At(this, 10) + .At(this, 11) .WithParent(parent) .WithChildren(152, 13) .WithName("touch4") @@ -1700,7 +1719,7 @@ private UnityEngine.InputSystem.Controls.TouchControl Initialize_ctrlTouchscreen { var ctrlTouchscreentouch5 = new UnityEngine.InputSystem.Controls.TouchControl(); ctrlTouchscreentouch5.Setup() - .At(this, 11) + .At(this, 12) .WithParent(parent) .WithChildren(177, 13) .WithName("touch5") @@ -1721,7 +1740,7 @@ private UnityEngine.InputSystem.Controls.TouchControl Initialize_ctrlTouchscreen { var ctrlTouchscreentouch6 = new UnityEngine.InputSystem.Controls.TouchControl(); ctrlTouchscreentouch6.Setup() - .At(this, 12) + .At(this, 13) .WithParent(parent) .WithChildren(202, 13) .WithName("touch6") @@ -1742,7 +1761,7 @@ private UnityEngine.InputSystem.Controls.TouchControl Initialize_ctrlTouchscreen { var ctrlTouchscreentouch7 = new UnityEngine.InputSystem.Controls.TouchControl(); ctrlTouchscreentouch7.Setup() - .At(this, 13) + .At(this, 14) .WithParent(parent) .WithChildren(227, 13) .WithName("touch7") @@ -1763,7 +1782,7 @@ private UnityEngine.InputSystem.Controls.TouchControl Initialize_ctrlTouchscreen { var ctrlTouchscreentouch8 = new UnityEngine.InputSystem.Controls.TouchControl(); ctrlTouchscreentouch8.Setup() - .At(this, 14) + .At(this, 15) .WithParent(parent) .WithChildren(252, 13) .WithName("touch8") @@ -1784,7 +1803,7 @@ private UnityEngine.InputSystem.Controls.TouchControl Initialize_ctrlTouchscreen { var ctrlTouchscreentouch9 = new UnityEngine.InputSystem.Controls.TouchControl(); ctrlTouchscreentouch9.Setup() - .At(this, 15) + .At(this, 16) .WithParent(parent) .WithChildren(277, 13) .WithName("touch9") @@ -1801,26 +1820,6 @@ private UnityEngine.InputSystem.Controls.TouchControl Initialize_ctrlTouchscreen return ctrlTouchscreentouch9; } - private UnityEngine.InputSystem.Controls.IntegerControl Initialize_ctrlTouchscreendisplayIndex(InternedString kIntegerLayout, InputControl parent) - { - var ctrlTouchscreendisplayIndex = new UnityEngine.InputSystem.Controls.IntegerControl(); - ctrlTouchscreendisplayIndex.Setup() - .At(this, 16) - .WithParent(parent) - .WithName("displayIndex") - .WithDisplayName("Display Index") - .WithLayout(kIntegerLayout) - .WithStateBlock(new InputStateBlock - { - format = new FourCC(1431521364), - byteOffset = 34, - bitOffset = 0, - sizeInBits = 16 - }) - .Finish(); - return ctrlTouchscreendisplayIndex; - } - private UnityEngine.InputSystem.Controls.IntegerControl Initialize_ctrlTouchscreenprimaryTouchtouchId(InternedString kIntegerLayout, InputControl parent) { var ctrlTouchscreenprimaryTouchtouchId = new UnityEngine.InputSystem.Controls.IntegerControl(); diff --git a/Packages/com.unity.inputsystem/InputSystem/Devices/Touchscreen.cs b/Packages/com.unity.inputsystem/InputSystem/Devices/Touchscreen.cs index 748802ca7c..69735b1abe 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Devices/Touchscreen.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Devices/Touchscreen.cs @@ -374,6 +374,7 @@ internal unsafe struct TouchscreenState : IInputStateTypeInfo [InputControl(name = "pressure", useStateFrom = "primaryTouch/pressure")] [InputControl(name = "radius", useStateFrom = "primaryTouch/radius")] [InputControl(name = "press", useStateFrom = "primaryTouch/phase", layout = "TouchPress", synthetic = true, usages = new string[0])] + [InputControl(name = "displayIndex", useStateFrom = "primaryTouch/displayIndex", format = "BYTE")] // added format to override the Pointer's USHT value [FieldOffset(0)] public fixed byte primaryTouchData[TouchState.kSizeInBytes]; @@ -559,7 +560,6 @@ protected override void FinishSetup() base.FinishSetup(); primaryTouch = GetChildControl("primaryTouch"); - displayIndex = primaryTouch.displayIndex; // Find out how many touch controls we have. var touchControlCount = 0; From 24012a00bf0075b10d7644164cfba4b2e983b2e9 Mon Sep 17 00:00:00 2001 From: Simon Wittber Date: Fri, 11 Oct 2024 16:28:42 +0800 Subject: [PATCH 11/14] FIX: UUM-71260 Removed redundant warning (#2020) * removed redundant warning --- Packages/com.unity.inputsystem/CHANGELOG.md | 3 +++ .../com.unity.inputsystem/InputSystem/Plugins/HID/HID.cs | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index b0dc44e136..9747ab920a 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -21,6 +21,9 @@ however, it has to be formatted properly to pass verification tests. - Added the display of the device flag `CanRunInBackground` in device debug view. - Added analytics for programmatic `InputAction` setup via `InputActionSetupExtensions` when exiting play-mode. +### Fixed +- Removed a redundant warning when using fallback code to parse a HID descriptor. (UUM-71260) + ## [1.11.1] - 2024-09-26 ### Fixed diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/HID/HID.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/HID/HID.cs index 6be81a61cd..3e7354584b 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Plugins/HID/HID.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/HID/HID.cs @@ -6,6 +6,7 @@ using UnityEngine.InputSystem.LowLevel; using UnityEngine.InputSystem.Utilities; using Unity.Collections.LowLevel.Unsafe; +using Unity.Profiling; using UnityEngine.InputSystem.Layouts; using UnityEngine.Scripting; #if UNITY_2021_2_OR_NEWER @@ -84,6 +85,8 @@ public HIDDeviceDescriptor hidDescriptor private bool m_HaveParsedHIDDescriptor; private HIDDeviceDescriptor m_HIDDescriptor; + private static readonly ProfilerMarker k_HIDParseDescriptorFallback = new ProfilerMarker("HIDParseDescriptorFallback"); + // This is the workhorse for figuring out fallback options for HIDs attached to the system. // If the system cannot find a more specific layout for a given HID, this method will try // to produce a layout builder on the fly based on the HID descriptor received from @@ -1130,8 +1133,10 @@ public static HIDDeviceDescriptor FromJson(string json) } catch (Exception) { - Debug.LogWarning($"Couldn't parse HID descriptor with fast parser. Using fallback"); - return JsonUtility.FromJson(json); + k_HIDParseDescriptorFallback.Begin(); + var descriptor = JsonUtility.FromJson(json); + k_HIDParseDescriptorFallback.End(); + return descriptor; } #else return JsonUtility.FromJson(json); From ba9677b6fb48a3a111ffb4400dfd3f4c5cd99c81 Mon Sep 17 00:00:00 2001 From: Alex Tyrer Date: Fri, 11 Oct 2024 11:45:34 +0100 Subject: [PATCH 12/14] CHANGE: Performance improvement - removed project-wide asset migration code (#2025) This was only required to fix projects created with 1.8.0-pre-release versions. As it adds a performance cost on each domain reload the decision was made to removing this performance improvement. --- Packages/com.unity.inputsystem/CHANGELOG.md | 3 + .../ProjectWideActionsAsset.cs | 74 ------------------- 2 files changed, 3 insertions(+), 74 deletions(-) diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index 9747ab920a..b75bc0c0a4 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -24,6 +24,9 @@ however, it has to be formatted properly to pass verification tests. ### Fixed - Removed a redundant warning when using fallback code to parse a HID descriptor. (UUM-71260) +### Changed +- Removed the InputManager to InputSystem project-wide asset migration code for performance improvement (ISX-2086) + ## [1.11.1] - 2024-09-26 ### Fixed diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/ProjectWideActions/ProjectWideActionsAsset.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/ProjectWideActions/ProjectWideActionsAsset.cs index 784b52506d..027faf6e5f 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/ProjectWideActions/ProjectWideActionsAsset.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/ProjectWideActions/ProjectWideActionsAsset.cs @@ -17,25 +17,14 @@ internal static class ProjectWideActionsAsset internal static class ProjectSettingsProjectWideActionsAssetConverter { - private const string kAssetPathInputManager = "ProjectSettings/InputManager.asset"; - private const string kAssetNameProjectWideInputActions = "ProjectWideInputActions"; - class ProjectSettingsPostprocessor : AssetPostprocessor { - private static bool migratedInputActionAssets = false; - #if UNITY_2021_2_OR_NEWER private static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths, bool didDomainReload) #else private static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths) #endif { - if (!migratedInputActionAssets) - { - MoveInputManagerAssetActionsToProjectWideInputActionAsset(); - migratedInputActionAssets = true; - } - if (!Application.isPlaying) { // If the Library folder is deleted, InputSystem will fail to retrieve the assigned Project-wide Asset because this look-up occurs @@ -46,69 +35,6 @@ private static void OnPostprocessAllAssets(string[] importedAssets, string[] del } } } - - private static void MoveInputManagerAssetActionsToProjectWideInputActionAsset() - { - var objects = AssetDatabase.LoadAllAssetsAtPath(EditorHelpers.GetPhysicalPath(kAssetPathInputManager)); - if (objects == null) - return; - - var inputActionsAsset = objects.FirstOrDefault(o => o != null && o.name == kAssetNameProjectWideInputActions) as InputActionAsset; - if (inputActionsAsset != default) - { - // Found some actions in the InputManager.asset file - // - string path = ProjectWideActionsAsset.kDefaultAssetPath; - - if (File.Exists(EditorHelpers.GetPhysicalPath(path))) - { - // We already have a path containing inputactions, find a new unique filename - // - // eg Assets/InputSystem_Actions.inputactions -> - // Assets/InputSystem_Actions (1).inputactions -> - // Assets/InputSystem_Actions (2).inputactions ... - // - string[] files = Directory.GetFiles("Assets", "*.inputactions"); - List names = new List(); - for (int i = 0; i < files.Length; i++) - { - names.Add(System.IO.Path.GetFileNameWithoutExtension(files[i])); - } - string unique = ObjectNames.GetUniqueName(names.ToArray(), kDefaultAssetName); - path = "Assets/" + unique + ".inputactions"; - } - - var json = inputActionsAsset.ToJson(); - InputActionAssetManager.SaveAsset(EditorHelpers.GetPhysicalPath(path), json); - - Debug.Log($"Migrated Project-wide Input Actions from '{kAssetPathInputManager}' to '{path}' asset"); - - // Update current project-wide settings if needed (don't replace if already set to something else) - // - if (InputSystem.actions == null || InputSystem.actions.name == kAssetNameProjectWideInputActions) - { - InputSystem.actions = (InputActionAsset)AssetDatabase.LoadAssetAtPath(path, typeof(InputActionAsset)); - Debug.Log($"Loaded Project-wide Input Actions from '{path}' asset"); - } - } - - // Handle deleting all InputActionAssets as older 1.8.0 pre release could create more than one project wide input asset in the file - foreach (var obj in objects) - { - if (obj is InputActionReference) - { - var actionReference = obj as InputActionReference; - AssetDatabase.RemoveObjectFromAsset(obj); - Object.DestroyImmediate(actionReference); - } - else if (obj is InputActionAsset) - { - AssetDatabase.RemoveObjectFromAsset(obj); - } - } - - AssetDatabase.SaveAssets(); - } } // Returns the default asset path for where to create project-wide actions asset. From bfe5dfd12be8cf2d7496a5fa50eb253c44012777 Mon Sep 17 00:00:00 2001 From: Alex Tyrer Date: Fri, 11 Oct 2024 12:29:20 +0100 Subject: [PATCH 13/14] FIX: Improvement for event handling in FixedUpdate mode (#2026) * [Input System] Improvement for event handling in FixedUpdate mode Previously InputAction.WasPerformedThisFrame() could be true for consecutive frames.InputAction. This happens in frames where no FixedUpdate steps are run. --- Packages/com.unity.inputsystem/CHANGELOG.md | 1 + .../InputSystem/Actions/InputAction.cs | 8 ++++---- .../InputSystem/Actions/InputActionState.cs | 14 +++++++++++++- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index b75bc0c0a4..98b6df8b90 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 wrong mapping of Xbox Series S|X and Xbox One wireless controllers "View" button on macOS.[ISXB-385](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-385) - Fixed "AnalyticsResult" errors on consoles [ISXB-1107] - Fixed wrong `Display Index` value for touchscreen events.[ISXB-1101](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1101) +- Fixed event handling when using Fixed Update processing where WasPressedThisFrame could appear to true for consecutive frames [ISXB-1006](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1006) ### Added - Added the display of the device flag `CanRunInBackground` in device debug view. diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/InputAction.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/InputAction.cs index e303f16570..f196465961 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/InputAction.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/InputAction.cs @@ -1236,7 +1236,7 @@ public unsafe bool WasPressedThisFrame() { var actionStatePtr = &state.actionStates[m_ActionIndexInState]; var currentUpdateStep = InputUpdate.s_UpdateStepCount; - return actionStatePtr->pressedInUpdate == currentUpdateStep && currentUpdateStep != default; + return actionStatePtr->pressedInUpdate == currentUpdateStep && currentUpdateStep != default && actionStatePtr->frame == Time.frameCount; } return false; @@ -1285,7 +1285,7 @@ public unsafe bool WasReleasedThisFrame() { var actionStatePtr = &state.actionStates[m_ActionIndexInState]; var currentUpdateStep = InputUpdate.s_UpdateStepCount; - return actionStatePtr->releasedInUpdate == currentUpdateStep && currentUpdateStep != default; + return actionStatePtr->releasedInUpdate == currentUpdateStep && currentUpdateStep != default && actionStatePtr->frame == Time.frameCount; } return false; @@ -1344,7 +1344,7 @@ public unsafe bool WasPerformedThisFrame() { var actionStatePtr = &state.actionStates[m_ActionIndexInState]; var currentUpdateStep = InputUpdate.s_UpdateStepCount; - return actionStatePtr->lastPerformedInUpdate == currentUpdateStep && currentUpdateStep != default; + return actionStatePtr->lastPerformedInUpdate == currentUpdateStep && currentUpdateStep != default && actionStatePtr->frame == Time.frameCount; } return false; @@ -1417,7 +1417,7 @@ public unsafe bool WasCompletedThisFrame() { var actionStatePtr = &state.actionStates[m_ActionIndexInState]; var currentUpdateStep = InputUpdate.s_UpdateStepCount; - return actionStatePtr->lastCompletedInUpdate == currentUpdateStep && currentUpdateStep != default; + return actionStatePtr->lastCompletedInUpdate == currentUpdateStep && currentUpdateStep != default && actionStatePtr->frame == Time.frameCount; } return false; diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/InputActionState.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/InputActionState.cs index 3ba1503d49..cd17fdd942 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/InputActionState.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/InputActionState.cs @@ -560,6 +560,7 @@ private void RestoreActionStatesAfterReResolvingBindings(UnmanagedMemory oldStat newActionState.releasedInUpdate = oldActionState.releasedInUpdate; newActionState.startTime = oldActionState.startTime; newActionState.bindingIndex = oldActionState.bindingIndex; + newActionState.frame = oldActionState.frame; if (oldActionState.phase != InputActionPhase.Disabled) { @@ -884,6 +885,7 @@ public void ResetActionState(int actionIndex, InputActionPhase toPhase = InputAc actionState->lastCompletedInUpdate = default; actionState->pressedInUpdate = default; actionState->releasedInUpdate = default; + actionState->frame = default; } Debug.Assert(!actionState->isStarted, "Cannot reset an action to started phase"); @@ -1579,6 +1581,7 @@ private void ProcessButtonState(ref TriggerState trigger, int actionIndex, Bindi { actionState->pressedInUpdate = InputUpdate.s_UpdateStepCount; actionState->isPressed = true; + actionState->frame = Time.frameCount; } else if (actionState->isPressed) { @@ -1587,6 +1590,7 @@ private void ProcessButtonState(ref TriggerState trigger, int actionIndex, Bindi { actionState->releasedInUpdate = InputUpdate.s_UpdateStepCount; actionState->isPressed = false; + actionState->frame = Time.frameCount; } } } @@ -2445,6 +2449,7 @@ private void ChangePhaseOfActionInternal(int actionIndex, TriggerState* actionSt newState.magnitude = 0f; newState.phase = newPhase; + newState.frame = Time.frameCount; if (newPhase == InputActionPhase.Performed) { newState.lastPerformedInUpdate = InputUpdate.s_UpdateStepCount; @@ -3627,7 +3632,7 @@ public int partIndex /// other is to represent the current actuation state of an action as a whole. The latter is stored in /// while the former is passed around as temporary instances on the stack. /// - [StructLayout(LayoutKind.Explicit, Size = 52)] + [StructLayout(LayoutKind.Explicit, Size = 56)] public struct TriggerState { public const int kMaxNumMaps = byte.MaxValue; @@ -3651,6 +3656,7 @@ public struct TriggerState [FieldOffset(40)] private uint m_PressedInUpdate; [FieldOffset(44)] private uint m_ReleasedInUpdate; [FieldOffset(48)] private uint m_LastCompletedInUpdate; + [FieldOffset(52)] private int m_Frame; /// /// Phase being triggered by the control value change. @@ -3806,6 +3812,12 @@ public uint lastPerformedInUpdate set => m_LastPerformedInUpdate = value; } + internal int frame + { + get => m_Frame; + set => m_Frame = value; + } + /// /// Update step count () in which action completed last. /// Zero if the action did not become completed yet. Also reset to zero when the action is hard reset. From db7b26f5ffd90194dab99eaf709f710fd2e38225 Mon Sep 17 00:00:00 2001 From: Paulius Dervinis Date: Wed, 16 Oct 2024 13:23:09 +0300 Subject: [PATCH 14/14] RELEASE: 1.11.2 --- Packages/com.unity.inputsystem/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index 98b6df8b90..30ab76b9d1 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. Due to package verification, the latest version below is the unpublished version and the date is meaningless. however, it has to be formatted properly to pass verification tests. -## [Unreleased] - yyyy-mm-dd +## [1.11.2] - 2024-10-16 ### Fixed - Fixed touch pointers being released twice causing an index out of bounds error. [ISXB-687](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-687)