From 8c641671778e0090cd040443f140025a59571b2a Mon Sep 17 00:00:00 2001 From: Anthony Yakovlev Date: Fri, 14 Nov 2025 16:57:04 +0300 Subject: [PATCH 01/21] deprecate the useimguiforassets feature flag --- .../InputSystem/InputSettings.cs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/InputSettings.cs b/Packages/com.unity.inputsystem/InputSystem/InputSettings.cs index a423c88084..4332dbb0aa 100644 --- a/Packages/com.unity.inputsystem/InputSystem/InputSettings.cs +++ b/Packages/com.unity.inputsystem/InputSystem/InputSettings.cs @@ -739,6 +739,11 @@ public void SetInternalFeatureFlag(string featureName, bool enabled) if (string.IsNullOrEmpty(featureName)) throw new ArgumentNullException(nameof(featureName)); + if (featureName == InputFeatureNames.kUseIMGUIEditorForAssets) + { + throw new ArgumentException($"The {InputFeatureNames.kUseIMGUIEditorForAssets} feature flag is no longer supported."); + } + if (m_FeatureFlags == null) m_FeatureFlags = new HashSet(); @@ -979,14 +984,8 @@ public enum InputActionPropertyDrawerMode } #if UNITY_EDITOR - /// - /// Determines if we should render the UI with IMGUI even if an UI Toolkit UI is available. - /// - /// This should be used when writing a custom to : - /// * support inspector view which only work in IMGUI for now. - /// * prevent the UI to be rendered in IMGUI and UI Toolkit in the Input Actions Editor window. - /// - public bool useIMGUIEditorForAssets => UnityEditor.EditorGUI.indentLevel > 0 || IsFeatureEnabled(InputFeatureNames.kUseIMGUIEditorForAssets); + [Obsolete("The useIMGUIEditorForAssets feature is obsolete and will be removed in a future release.")] + public bool useIMGUIEditorForAssets => false; #endif private static bool CompareFloats(float a, float b) From cee0add0a3743d88248a95a5e26373313c46b466 Mon Sep 17 00:00:00 2001 From: Anthony Yakovlev Date: Fri, 14 Nov 2025 17:25:35 +0300 Subject: [PATCH 02/21] remove imgui code from input parameter editors --- .../Actions/Composites/AxisComposite.cs | 15 ++-- .../Actions/Composites/Vector2Composite.cs | 15 ++-- .../Actions/Composites/Vector3Composite.cs | 15 ++-- .../Actions/Interactions/HoldInteraction.cs | 7 +- .../Interactions/MultiTapInteraction.cs | 18 ++--- .../Actions/Interactions/PressInteraction.cs | 26 +++---- .../Interactions/SlowTapInteraction.cs | 6 -- .../Actions/Interactions/TapInteraction.cs | 6 -- .../Processors/AxisDeadzoneProcessor.cs | 6 -- .../Processors/StickDeadzoneProcessor.cs | 6 -- .../Editor/AssetEditor/ParameterListView.cs | 68 +------------------ .../InputSystem/InputSettings.cs | 2 +- 12 files changed, 31 insertions(+), 159 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/AxisComposite.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/AxisComposite.cs index da72a70b8a..6ed62882b5 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/AxisComposite.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/AxisComposite.cs @@ -5,7 +5,6 @@ #if UNITY_EDITOR using System; -using UnityEditor; using UnityEngine.InputSystem.Editor; using UnityEngine.UIElements; #endif @@ -212,24 +211,20 @@ public enum WhichSideWins #if UNITY_EDITOR internal class AxisCompositeEditor : InputParameterEditor { - private GUIContent m_WhichAxisWinsLabel = new GUIContent("Which Side Wins", - "Determine which axis 'wins' if both are actuated at the same time. " + private const string label = "Which Side Wins"; + private const string tolltip = "Determine which axis 'wins' if both are actuated at the same time. " + "If 'Neither' is selected, the result is 0 (or, more precisely, " - + "the midpoint between minValue and maxValue)."); + + "the midpoint between minValue and maxValue)."; public override void OnGUI() { - if (!InputSystem.settings.useIMGUIEditorForAssets) - return; - - target.whichSideWins = (AxisComposite.WhichSideWins)EditorGUILayout.EnumPopup(m_WhichAxisWinsLabel, target.whichSideWins); } public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) { - var modeField = new EnumField(m_WhichAxisWinsLabel.text, target.whichSideWins) + var modeField = new EnumField(label, target.whichSideWins) { - tooltip = m_WhichAxisWinsLabel.tooltip + tooltip = tolltip }; modeField.RegisterValueChangedCallback(evt => diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector2Composite.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector2Composite.cs index 730588db0c..aa4fb50a4c 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector2Composite.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector2Composite.cs @@ -5,7 +5,6 @@ using UnityEngine.InputSystem.Utilities; #if UNITY_EDITOR -using UnityEditor; using UnityEngine.InputSystem.Editor; using UnityEngine.UIElements; #endif @@ -192,24 +191,20 @@ public enum Mode #if UNITY_EDITOR internal class Vector2CompositeEditor : InputParameterEditor { - private GUIContent m_ModeLabel = new GUIContent("Mode", - "How to synthesize a Vector2 from the inputs. Digital " + private const string label = "Mode"; + private const string tooltip = "How to synthesize a Vector2 from the inputs. Digital " + "treats part bindings as buttons (on/off) whereas Analog preserves " - + "floating-point magnitudes as read from controls."); + + "floating-point magnitudes as read from controls."; public override void OnGUI() { - if (!InputSystem.settings.useIMGUIEditorForAssets) - return; - - target.mode = (Vector2Composite.Mode)EditorGUILayout.EnumPopup(m_ModeLabel, target.mode); } public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) { - var modeField = new EnumField(m_ModeLabel.text, target.mode) + var modeField = new EnumField(label, target.mode) { - tooltip = m_ModeLabel.tooltip + tooltip = tooltip }; modeField.RegisterValueChangedCallback(evt => diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector3Composite.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector3Composite.cs index 21383c700b..72371f81b3 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector3Composite.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector3Composite.cs @@ -4,7 +4,6 @@ using UnityEngine.InputSystem.Utilities; #if UNITY_EDITOR -using UnityEditor; using UnityEngine.InputSystem.Editor; using UnityEngine.UIElements; #endif @@ -172,24 +171,20 @@ public enum Mode #if UNITY_EDITOR internal class Vector3CompositeEditor : InputParameterEditor { - private GUIContent m_ModeLabel = new GUIContent("Mode", - "How to synthesize a Vector3 from the inputs. Digital " + private const string label = "Mode"; + private const string tooltip = "How to synthesize a Vector3 from the inputs. Digital " + "treats part bindings as buttons (on/off) whereas Analog preserves " - + "floating-point magnitudes as read from controls."); + + "floating-point magnitudes as read from controls."; public override void OnGUI() { - if (!InputSystem.settings.useIMGUIEditorForAssets) - return; - - target.mode = (Vector3Composite.Mode)EditorGUILayout.EnumPopup(m_ModeLabel, target.mode); } public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) { - var modeField = new EnumField(m_ModeLabel.text, target.mode) + var modeField = new EnumField(label, target.mode) { - tooltip = m_ModeLabel.tooltip + tooltip = tooltip }; modeField.RegisterValueChangedCallback(evt => diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/HoldInteraction.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/HoldInteraction.cs index 9345d5f9b0..45f08e261f 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/HoldInteraction.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/HoldInteraction.cs @@ -1,7 +1,7 @@ using System; using System.ComponentModel; using UnityEngine.InputSystem.Controls; -using UnityEngine.Scripting; + #if UNITY_EDITOR using UnityEngine.InputSystem.Editor; using UnityEngine.UIElements; @@ -124,11 +124,6 @@ protected override void OnEnable() public override void OnGUI() { - if (!InputSystem.settings.useIMGUIEditorForAssets) - return; - - m_PressPointSetting.OnGUI(); - m_DurationSetting.OnGUI(); } public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/MultiTapInteraction.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/MultiTapInteraction.cs index 41610ced29..d068639dae 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/MultiTapInteraction.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/MultiTapInteraction.cs @@ -1,11 +1,9 @@ using System; using UnityEngine.InputSystem.Controls; -using UnityEngine.Scripting; + #if UNITY_EDITOR -using UnityEditor; using UnityEngine.InputSystem.Editor; using UnityEngine.UIElements; -using UnityEditor.UIElements; #endif ////TODO: add ability to respond to any of the taps in the sequence (e.g. one response for single tap, another for double tap) @@ -196,21 +194,14 @@ protected override void OnEnable() public override void OnGUI() { - if (!InputSystem.settings.useIMGUIEditorForAssets) - return; - - target.tapCount = EditorGUILayout.IntField(m_TapCountLabel, target.tapCount); - m_TapDelaySetting.OnGUI(); - m_TapTimeSetting.OnGUI(); - m_PressPointSetting.OnGUI(); } public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) { - var tapCountField = new IntegerField(m_TapCountLabel.text) + var tapCountField = new IntegerField(tapLabel) { value = target.tapCount, - tooltip = m_TapCountLabel.tooltip + tooltip = tapTooltip }; tapCountField.RegisterValueChangedCallback(evt => { @@ -224,7 +215,8 @@ public override void OnDrawVisualElements(VisualElement root, Action onChangedCa m_PressPointSetting.OnDrawVisualElements(root, onChangedCallback); } - private readonly GUIContent m_TapCountLabel = new GUIContent("Tap Count", "How many taps need to be performed in succession. Two means double-tap, three means triple-tap, and so on."); + private const string tapLabel = "Tap Count"; + private const string tapTooltip = "How many taps need to be performed in succession. Two means double-tap, three means triple-tap, and so on."; private CustomOrDefaultSetting m_PressPointSetting; private CustomOrDefaultSetting m_TapTimeSetting; diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/PressInteraction.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/PressInteraction.cs index f5361ae56b..3b7c7a20b0 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/PressInteraction.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/PressInteraction.cs @@ -1,12 +1,9 @@ using System; using System.ComponentModel; using UnityEngine.InputSystem.Controls; -using UnityEngine.Scripting; #if UNITY_EDITOR -using UnityEditor; using UnityEngine.InputSystem.Editor; using UnityEngine.UIElements; -using UnityEditor.UIElements; #endif ////TODO: protect against the control *hovering* around the press point; this should not fire the press repeatedly; probably need a zone around the press point @@ -213,21 +210,15 @@ protected override void OnEnable() public override void OnGUI() { - if (!InputSystem.settings.useIMGUIEditorForAssets) - return; - - EditorGUILayout.HelpBox(s_HelpBoxText); - target.behavior = (PressBehavior)EditorGUILayout.EnumPopup(s_PressBehaviorLabel, target.behavior); - m_PressPointSetting.OnGUI(); } public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) { - root.Add(new HelpBox(s_HelpBoxText.text, HelpBoxMessageType.None)); + root.Add(new HelpBox(helpLabel, HelpBoxMessageType.None)); - var behaviourDropdown = new EnumField(s_PressBehaviorLabel.text, target.behavior) + var behaviourDropdown = new EnumField(triggerLabel, target.behavior) { - tooltip = s_PressBehaviorLabel.tooltip + tooltip = triggerTooltip }; behaviourDropdown.RegisterValueChangedCallback(evt => { @@ -241,14 +232,13 @@ public override void OnDrawVisualElements(VisualElement root, Action onChangedCa private CustomOrDefaultSetting m_PressPointSetting; - private static readonly GUIContent s_HelpBoxText = EditorGUIUtility.TrTextContent("Note that the 'Press' interaction is only " + private const string helpLabel = "Note that the 'Press' interaction is only " + "necessary when wanting to customize button press behavior. For default press behavior, simply set the action type to 'Button' " - + "and use the action without interactions added to it."); - - private static readonly GUIContent s_PressBehaviorLabel = EditorGUIUtility.TrTextContent("Trigger Behavior", - "Determines how button presses trigger the action. By default (PressOnly), the action is performed on press. " + + "and use the action without interactions added to it."; + private const string triggerLabel = "Trigger Behavior"; + private const string triggerTooltip = "Determines how button presses trigger the action. By default (PressOnly), the action is performed on press. " + "With ReleaseOnly, the action is performed on release. With PressAndRelease, the action is performed on press and " - + "canceled on release."); + + "canceled on release."; } #endif } diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/SlowTapInteraction.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/SlowTapInteraction.cs index cb79393e00..6d663989b5 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/SlowTapInteraction.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/SlowTapInteraction.cs @@ -1,7 +1,6 @@ using System; using System.ComponentModel; using UnityEngine.InputSystem.Controls; -using UnityEngine.Scripting; #if UNITY_EDITOR using UnityEngine.InputSystem.Editor; using UnityEngine.UIElements; @@ -88,11 +87,6 @@ protected override void OnEnable() public override void OnGUI() { - if (!InputSystem.settings.useIMGUIEditorForAssets) - return; - - m_DurationSetting.OnGUI(); - m_PressPointSetting.OnGUI(); } public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/TapInteraction.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/TapInteraction.cs index 984d35541c..55d1ea856e 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/TapInteraction.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/TapInteraction.cs @@ -1,7 +1,6 @@ using System; using System.ComponentModel; using UnityEngine.InputSystem.Controls; -using UnityEngine.Scripting; #if UNITY_EDITOR using UnityEngine.InputSystem.Editor; using UnityEngine.UIElements; @@ -114,11 +113,6 @@ protected override void OnEnable() public override void OnGUI() { - if (!InputSystem.settings.useIMGUIEditorForAssets) - return; - - m_DurationSetting.OnGUI(); - m_PressPointSetting.OnGUI(); } public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/Processors/AxisDeadzoneProcessor.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/Processors/AxisDeadzoneProcessor.cs index f86bb17c18..066eb2aaf4 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/Processors/AxisDeadzoneProcessor.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/Processors/AxisDeadzoneProcessor.cs @@ -1,5 +1,4 @@ using System; -using UnityEngine.Scripting; #if UNITY_EDITOR using UnityEngine.InputSystem.Editor; @@ -93,11 +92,6 @@ protected override void OnEnable() public override void OnGUI() { - if (!InputSystem.settings.useIMGUIEditorForAssets) - return; - - m_MinSetting.OnGUI(); - m_MaxSetting.OnGUI(); } public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/Processors/StickDeadzoneProcessor.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/Processors/StickDeadzoneProcessor.cs index 631f7b51d5..1dec047010 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/Processors/StickDeadzoneProcessor.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/Processors/StickDeadzoneProcessor.cs @@ -1,5 +1,4 @@ using System; -using UnityEngine.Scripting; #if UNITY_EDITOR using UnityEngine.InputSystem.Editor; @@ -82,11 +81,6 @@ protected override void OnEnable() public override void OnGUI() { - if (!InputSystem.settings.useIMGUIEditorForAssets) - return; - - m_MinSetting.OnGUI(); - m_MaxSetting.OnGUI(); } public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/ParameterListView.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/ParameterListView.cs index 25bd44764c..1c0a8926bc 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/ParameterListView.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/ParameterListView.cs @@ -4,7 +4,6 @@ using System.Linq; using System.Reflection; using UnityEditor; -using UnityEditor.UIElements; using UnityEngine.InputSystem.Layouts; using UnityEngine.InputSystem.Utilities; using UnityEngine.UIElements; @@ -350,72 +349,7 @@ private void OnValuesChanged() public void OnGUI() { - // If we have a dedicated parameter editor, let it do all the work. - if (m_ParameterEditor != null) - { - EditorGUI.BeginChangeCheck(); - m_ParameterEditor.OnGUI(); - if (EditorGUI.EndChangeCheck()) - { - ReadParameterValuesFrom(m_ParameterEditor.target); - onChange?.Invoke(); - } - return; - } - - // handled by OnDrawVisualElements with UI Toolkit - if (!InputSystem.settings.useIMGUIEditorForAssets) - return; - - // Otherwise, fall back to our default logic. - if (m_Parameters == null) - return; - for (var i = 0; i < m_Parameters.Length; i++) - { - var parameter = m_Parameters[i]; - var label = m_ParameterLabels[i]; - - EditorGUI.BeginChangeCheck(); - - object result = null; - if (parameter.isEnum) - { - var intValue = parameter.value.value.ToInt32(); - result = EditorGUILayout.IntPopup(label, intValue, parameter.enumNames, parameter.enumValues); - } - else if (parameter.value.type == TypeCode.Int64 || parameter.value.type == TypeCode.UInt64) - { - var longValue = parameter.value.value.ToInt64(); - result = EditorGUILayout.LongField(label, longValue); - } - else if (parameter.value.type.IsInt()) - { - var intValue = parameter.value.value.ToInt32(); - result = EditorGUILayout.IntField(label, intValue); - } - else if (parameter.value.type == TypeCode.Single) - { - var floatValue = parameter.value.value.ToSingle(); - result = EditorGUILayout.FloatField(label, floatValue); - } - else if (parameter.value.type == TypeCode.Double) - { - var floatValue = parameter.value.value.ToDouble(); - result = EditorGUILayout.DoubleField(label, floatValue); - } - else if (parameter.value.type == TypeCode.Boolean) - { - var boolValue = parameter.value.value.ToBoolean(); - result = EditorGUILayout.Toggle(label, boolValue); - } - - if (EditorGUI.EndChangeCheck()) - { - parameter.value.value = PrimitiveValue.FromObject(result).ConvertTo(parameter.value.type); - m_Parameters[i] = parameter; - onChange?.Invoke(); - } - } + } ////REVIEW: check whether parameters have *actually* changed? diff --git a/Packages/com.unity.inputsystem/InputSystem/InputSettings.cs b/Packages/com.unity.inputsystem/InputSystem/InputSettings.cs index 4332dbb0aa..013be0c13a 100644 --- a/Packages/com.unity.inputsystem/InputSystem/InputSettings.cs +++ b/Packages/com.unity.inputsystem/InputSystem/InputSettings.cs @@ -984,7 +984,7 @@ public enum InputActionPropertyDrawerMode } #if UNITY_EDITOR - [Obsolete("The useIMGUIEditorForAssets feature is obsolete and will be removed in a future release.")] + [Obsolete("useIMGUIEditorForAssets is obsolete and will be removed in a future release.")] public bool useIMGUIEditorForAssets => false; #endif From b4551891a493e881919d64ce3295272861925046 Mon Sep 17 00:00:00 2001 From: Anthony Yakovlev Date: Fri, 14 Nov 2025 17:36:01 +0300 Subject: [PATCH 03/21] don't use GUIContent (an imgui dependency) --- .../Editor/AssetEditor/ParameterListView.cs | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/ParameterListView.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/ParameterListView.cs index 1c0a8926bc..9e472b0d74 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/ParameterListView.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/ParameterListView.cs @@ -134,7 +134,7 @@ public void Initialize(Type registeredType, ReadOnlyArray existingPa parameter.value = parameter.value.ConvertTo(underlyingTypeCode); // Read enum names and values. - parameter.enumNames = Enum.GetNames(fieldType).Select(x => new GUIContent(x)).ToArray(); + parameter.enumNames = Enum.GetNames(fieldType); ////REVIEW: this probably falls apart if multiple members have the same value var list = new List(); foreach (var value in Enum.GetValues(fieldType)) @@ -223,7 +223,7 @@ public void Initialize(Type registeredType, ReadOnlyArray existingPa m_ParameterEditor = null; // Create parameter labels. - m_ParameterLabels = new GUIContent[m_Parameters.Length]; + m_ParameterLabels = new Tuple[m_Parameters.Length]; for (var i = 0; i < m_Parameters.Length; ++i) { // Look up tooltip from field. @@ -235,7 +235,7 @@ public void Initialize(Type registeredType, ReadOnlyArray existingPa // Create label. var niceName = ObjectNames.NicifyVariableName(m_Parameters[i].value.name); - m_ParameterLabels[i] = new GUIContent(niceName, tooltip); + m_ParameterLabels[i] = new Tuple(niceName, tooltip); } } } @@ -276,15 +276,15 @@ void OnEditEnd() if (parameter.isEnum) { - var names = parameter.enumNames.Select(c => c.text).ToList(); + var names = parameter.enumNames.ToList(); var rawValue = parameter.value.value.ToInt32(); var selectedIndex = parameter.enumValues.IndexOf(rawValue); if (selectedIndex < 0 || selectedIndex >= names.Count) selectedIndex = 0; - var field = new DropdownField(label.text, names, selectedIndex) + var field = new DropdownField(label.Item1, names, selectedIndex) { - tooltip = label.tooltip + tooltip = label.Item2 }; field.RegisterValueChangedCallback(evt => @@ -301,7 +301,7 @@ void OnEditEnd() else if (parameter.value.type == TypeCode.Int64 || parameter.value.type == TypeCode.UInt64) { var longValue = parameter.value.value.ToInt64(); - var field = new LongField(label.text) { value = longValue, tooltip = label.tooltip }; + var field = new LongField(label.Item1) { value = longValue, tooltip = label.Item2 }; field.RegisterValueChangedCallback(evt => OnValueChanged(ref parameter, evt.newValue, closedIndex)); field.RegisterCallback(_ => OnEditEnd()); root.Add(field); @@ -309,7 +309,7 @@ void OnEditEnd() else if (parameter.value.type.IsInt()) { var intValue = parameter.value.value.ToInt32(); - var field = new IntegerField(label.text) { value = intValue, tooltip = label.tooltip }; + var field = new IntegerField(label.Item1) { value = intValue, tooltip = label.Item2 }; field.RegisterValueChangedCallback(evt => OnValueChanged(ref parameter, evt.newValue, closedIndex)); field.RegisterCallback(_ => OnEditEnd()); root.Add(field); @@ -317,7 +317,7 @@ void OnEditEnd() else if (parameter.value.type == TypeCode.Single) { var floatValue = parameter.value.value.ToSingle(); - var field = new FloatField(label.text) { value = floatValue, tooltip = label.tooltip }; + var field = new FloatField(label.Item1) { value = floatValue, tooltip = label.Item2 }; field.RegisterValueChangedCallback(evt => OnValueChanged(ref parameter, evt.newValue, closedIndex)); field.RegisterCallback(_ => OnEditEnd()); root.Add(field); @@ -325,7 +325,7 @@ void OnEditEnd() else if (parameter.value.type == TypeCode.Double) { var floatValue = parameter.value.value.ToDouble(); - var field = new DoubleField(label.text) { value = floatValue, tooltip = label.tooltip }; + var field = new DoubleField(label.Item1) { value = floatValue, tooltip = label.Item2 }; field.RegisterValueChangedCallback(evt => OnValueChanged(ref parameter, evt.newValue, closedIndex)); field.RegisterCallback(_ => OnEditEnd()); root.Add(field); @@ -333,7 +333,7 @@ void OnEditEnd() else if (parameter.value.type == TypeCode.Boolean) { var boolValue = parameter.value.value.ToBoolean(); - var field = new Toggle(label.text) { value = boolValue, tooltip = label.tooltip }; + var field = new Toggle(label.Item1) { value = boolValue, tooltip = label.Item2 }; field.RegisterValueChangedCallback(evt => OnValueChanged(ref parameter, evt.newValue, closedIndex)); field.RegisterValueChangedCallback(_ => OnEditEnd()); root.Add(field); @@ -382,14 +382,16 @@ private void ReadParameterValuesFrom(object target) private InputParameterEditor m_ParameterEditor; private EditableParameterValue[] m_Parameters; - private GUIContent[] m_ParameterLabels; + + // .Item1 is text, .Item2 is tooltip + private Tuple[] m_ParameterLabels; private struct EditableParameterValue { public NamedValue value; public NamedValue? defaultValue; public int[] enumValues; - public GUIContent[] enumNames; + public string[] enumNames; public FieldInfo field; public bool isEnum => enumValues != null; From e7b62140cd9aa9b2eb1f2b8e5becbf89ba5ac475 Mon Sep 17 00:00:00 2001 From: Anthony Yakovlev Date: Fri, 14 Nov 2025 17:39:33 +0300 Subject: [PATCH 04/21] remove imgui from samples as well --- Assets/Samples/CustomComposite/CustomComposite.cs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Assets/Samples/CustomComposite/CustomComposite.cs b/Assets/Samples/CustomComposite/CustomComposite.cs index 273a54f4cd..0cbd54c3e0 100644 --- a/Assets/Samples/CustomComposite/CustomComposite.cs +++ b/Assets/Samples/CustomComposite/CustomComposite.cs @@ -136,13 +136,6 @@ public class CustomCompositeEditor : InputParameterEditor { public override void OnGUI() { - // Using the 'target' property, we can access an instance of our composite. - var currentValue = target.scaleFactor; - - // The easiest way to lay out our UI is to simply use EditorGUILayout. - // We simply assign the changed value back to the 'target' object. The input - // system will automatically detect a change in value. - target.scaleFactor = EditorGUILayout.Slider(m_ScaleFactorLabel, currentValue, 0, 2); } public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) From 51a63d0ae36877ca72ec9565f81d8defc15961ed Mon Sep 17 00:00:00 2001 From: Anthony Yakovlev Date: Fri, 14 Nov 2025 17:41:58 +0300 Subject: [PATCH 05/21] let's see if we can get away with cutting the whole OnGUI method altogether --- Assets/Samples/CustomComposite/CustomComposite.cs | 4 ---- .../InputSystem/Actions/Composites/AxisComposite.cs | 4 ---- .../InputSystem/Actions/Composites/Vector2Composite.cs | 4 ---- .../InputSystem/Actions/Composites/Vector3Composite.cs | 4 ---- .../InputSystem/Actions/Interactions/HoldInteraction.cs | 4 ---- .../InputSystem/Actions/Interactions/MultiTapInteraction.cs | 4 ---- .../InputSystem/Actions/Interactions/PressInteraction.cs | 4 ---- .../InputSystem/Actions/Interactions/SlowTapInteraction.cs | 4 ---- .../InputSystem/Actions/Interactions/TapInteraction.cs | 4 ---- .../InputSystem/Controls/Processors/AxisDeadzoneProcessor.cs | 4 ---- .../Controls/Processors/StickDeadzoneProcessor.cs | 4 ---- .../InputSystem/Editor/InputParameterEditor.cs | 5 ----- 12 files changed, 49 deletions(-) diff --git a/Assets/Samples/CustomComposite/CustomComposite.cs b/Assets/Samples/CustomComposite/CustomComposite.cs index 0cbd54c3e0..bc81f8b552 100644 --- a/Assets/Samples/CustomComposite/CustomComposite.cs +++ b/Assets/Samples/CustomComposite/CustomComposite.cs @@ -134,10 +134,6 @@ public override Vector2 ReadValue(ref InputBindingCompositeContext context) #if UNITY_EDITOR public class CustomCompositeEditor : InputParameterEditor { - public override void OnGUI() - { - } - public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) { var slider = new Slider(m_ScaleFactorLabel.text, 0, 2) diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/AxisComposite.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/AxisComposite.cs index 6ed62882b5..dfd7e77a80 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/AxisComposite.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/AxisComposite.cs @@ -216,10 +216,6 @@ internal class AxisCompositeEditor : InputParameterEditor + "If 'Neither' is selected, the result is 0 (or, more precisely, " + "the midpoint between minValue and maxValue)."; - public override void OnGUI() - { - } - public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) { var modeField = new EnumField(label, target.whichSideWins) diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector2Composite.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector2Composite.cs index aa4fb50a4c..18353a29b4 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector2Composite.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector2Composite.cs @@ -196,10 +196,6 @@ internal class Vector2CompositeEditor : InputParameterEditor + "treats part bindings as buttons (on/off) whereas Analog preserves " + "floating-point magnitudes as read from controls."; - public override void OnGUI() - { - } - public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) { var modeField = new EnumField(label, target.mode) diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector3Composite.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector3Composite.cs index 72371f81b3..3b70843277 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector3Composite.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector3Composite.cs @@ -176,10 +176,6 @@ internal class Vector3CompositeEditor : InputParameterEditor + "treats part bindings as buttons (on/off) whereas Analog preserves " + "floating-point magnitudes as read from controls."; - public override void OnGUI() - { - } - public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) { var modeField = new EnumField(label, target.mode) diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/HoldInteraction.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/HoldInteraction.cs index 45f08e261f..3e31db79f9 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/HoldInteraction.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/HoldInteraction.cs @@ -122,10 +122,6 @@ protected override void OnEnable() () => target.duration, x => target.duration = x, () => InputSystem.settings.defaultHoldTime); } - public override void OnGUI() - { - } - public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) { m_PressPointSetting.OnDrawVisualElements(root, onChangedCallback); diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/MultiTapInteraction.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/MultiTapInteraction.cs index d068639dae..b1e948e545 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/MultiTapInteraction.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/MultiTapInteraction.cs @@ -192,10 +192,6 @@ protected override void OnEnable() () => InputSystem.settings.defaultButtonPressPoint); } - public override void OnGUI() - { - } - public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) { var tapCountField = new IntegerField(tapLabel) diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/PressInteraction.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/PressInteraction.cs index 3b7c7a20b0..1a0646cb51 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/PressInteraction.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/PressInteraction.cs @@ -208,10 +208,6 @@ protected override void OnEnable() () => InputSystem.settings.defaultButtonPressPoint); } - public override void OnGUI() - { - } - public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) { root.Add(new HelpBox(helpLabel, HelpBoxMessageType.None)); diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/SlowTapInteraction.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/SlowTapInteraction.cs index 6d663989b5..4934db6619 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/SlowTapInteraction.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/SlowTapInteraction.cs @@ -85,10 +85,6 @@ protected override void OnEnable() () => InputSystem.settings.defaultButtonPressPoint); } - public override void OnGUI() - { - } - public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) { m_DurationSetting.OnDrawVisualElements(root, onChangedCallback); diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/TapInteraction.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/TapInteraction.cs index 55d1ea856e..66eeab3823 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/TapInteraction.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/TapInteraction.cs @@ -111,10 +111,6 @@ protected override void OnEnable() () => InputSystem.settings.defaultButtonPressPoint); } - public override void OnGUI() - { - } - public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) { m_DurationSetting.OnDrawVisualElements(root, onChangedCallback); diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/Processors/AxisDeadzoneProcessor.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/Processors/AxisDeadzoneProcessor.cs index 066eb2aaf4..c20dc61787 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/Processors/AxisDeadzoneProcessor.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/Processors/AxisDeadzoneProcessor.cs @@ -90,10 +90,6 @@ protected override void OnEnable() () => InputSystem.settings.defaultDeadzoneMax); } - public override void OnGUI() - { - } - public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) { m_MinSetting.OnDrawVisualElements(root, onChangedCallback); diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/Processors/StickDeadzoneProcessor.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/Processors/StickDeadzoneProcessor.cs index 1dec047010..3c6122bba5 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/Processors/StickDeadzoneProcessor.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/Processors/StickDeadzoneProcessor.cs @@ -79,10 +79,6 @@ protected override void OnEnable() () => InputSystem.settings.defaultDeadzoneMax); } - public override void OnGUI() - { - } - public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) { m_MinSetting.OnDrawVisualElements(root, onChangedCallback); diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/InputParameterEditor.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/InputParameterEditor.cs index 2b5d28e7a7..6ef8f234ec 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/InputParameterEditor.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/InputParameterEditor.cs @@ -27,11 +27,6 @@ public abstract class InputParameterEditor /// public object target { get; internal set; } - /// - /// Callback for implementing a custom UI. - /// - public abstract void OnGUI(); - /// /// Add visual elements for this parameter editor to a root VisualElement. /// From 33fd875cb30bea5ce005d5d5bbdc74a7423a8ead Mon Sep 17 00:00:00 2001 From: Anthony Yakovlev Date: Fri, 14 Nov 2025 17:44:54 +0300 Subject: [PATCH 06/21] fixup typo --- .../InputSystem/Actions/Composites/AxisComposite.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/AxisComposite.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/AxisComposite.cs index dfd7e77a80..24b439dfb8 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/AxisComposite.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/AxisComposite.cs @@ -212,7 +212,7 @@ public enum WhichSideWins internal class AxisCompositeEditor : InputParameterEditor { private const string label = "Which Side Wins"; - private const string tolltip = "Determine which axis 'wins' if both are actuated at the same time. " + private const string tooltip = "Determine which axis 'wins' if both are actuated at the same time. " + "If 'Neither' is selected, the result is 0 (or, more precisely, " + "the midpoint between minValue and maxValue)."; @@ -220,7 +220,7 @@ public override void OnDrawVisualElements(VisualElement root, Action onChangedCa { var modeField = new EnumField(label, target.whichSideWins) { - tooltip = tolltip + tooltip = tooltip }; modeField.RegisterValueChangedCallback(evt => From 72e276118e04be94f5ffd66f27897b3efd82cdbf Mon Sep 17 00:00:00 2001 From: Anthony Yakovlev Date: Fri, 14 Nov 2025 18:14:39 +0300 Subject: [PATCH 07/21] code formatting --- .../InputSystem/Editor/AssetEditor/ParameterListView.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/ParameterListView.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/ParameterListView.cs index 9e472b0d74..75a36900ba 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/ParameterListView.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/ParameterListView.cs @@ -349,7 +349,6 @@ private void OnValuesChanged() public void OnGUI() { - } ////REVIEW: check whether parameters have *actually* changed? From 584c84c033762132cee2e0605864b903ef2b5d68 Mon Sep 17 00:00:00 2001 From: Anthony Yakovlev Date: Fri, 14 Nov 2025 18:20:33 +0300 Subject: [PATCH 08/21] what if we leave ongui only in the base class --- .../InputSystem/Editor/InputParameterEditor.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/InputParameterEditor.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/InputParameterEditor.cs index 6ef8f234ec..7fa3dc1cf4 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/InputParameterEditor.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/InputParameterEditor.cs @@ -27,6 +27,13 @@ public abstract class InputParameterEditor /// public object target { get; internal set; } + /// + /// Callback for implementing a custom UI. + /// It was mostly needed for the imgui-based editors and should be avoided now. + /// Should be removed once we can release the next major version. + /// + public void OnGUI() { } + /// /// Add visual elements for this parameter editor to a root VisualElement. /// From 2ae796319a4f7089c9fd52ab1e72027e33cb5264 Mon Sep 17 00:00:00 2001 From: Anthony Yakovlev Date: Fri, 14 Nov 2025 18:24:20 +0300 Subject: [PATCH 09/21] don't check for imgui feature flag in the uitk editor window --- .../Editor/UITKAssetEditor/InputActionsEditorWindow.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs index 9b9ccf4bcb..ae6e80c63a 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs @@ -58,9 +58,6 @@ public static bool OpenAsset(int instanceId, int line) private static bool OpenAsset(Object obj) { - if (InputSystem.settings.IsFeatureEnabled(InputFeatureNames.kUseIMGUIEditorForAssets)) - return false; - // Grab InputActionAsset. // NOTE: We defer checking out an asset until we save it. This allows a user to open an .inputactions asset and look at it // without forcing a checkout. From 303de65eef1d5316f326b139ba0a64ed62f0b33b Mon Sep 17 00:00:00 2001 From: Anthony Yakovlev Date: Fri, 14 Nov 2025 18:24:49 +0300 Subject: [PATCH 10/21] exclude useimguiassets from tests and analytics --- Assets/Tests/InputSystem/CoreTests_Actions.cs | 1 - Assets/Tests/InputSystem/CoreTests_Analytics.cs | 2 -- .../InputSystem/Editor/Analytics/InputBuildAnalytic.cs | 9 --------- 3 files changed, 12 deletions(-) diff --git a/Assets/Tests/InputSystem/CoreTests_Actions.cs b/Assets/Tests/InputSystem/CoreTests_Actions.cs index abf240d098..adf5f74c45 100644 --- a/Assets/Tests/InputSystem/CoreTests_Actions.cs +++ b/Assets/Tests/InputSystem/CoreTests_Actions.cs @@ -35,7 +35,6 @@ partial class CoreTests [TestCase(InputFeatureNames.kParanoidReadValueCachingChecks)] [TestCase(InputFeatureNames.kDisableUnityRemoteSupport)] [TestCase(InputFeatureNames.kRunPlayerUpdatesInEditMode)] - [TestCase(InputFeatureNames.kUseIMGUIEditorForAssets)] public void Settings_ShouldStoreSettingsAndFeatureFlags(string featureName) { using (var settings = Scoped.Object(InputSettings.CreateInstance())) diff --git a/Assets/Tests/InputSystem/CoreTests_Analytics.cs b/Assets/Tests/InputSystem/CoreTests_Analytics.cs index 2a156dfb35..f97611fd42 100644 --- a/Assets/Tests/InputSystem/CoreTests_Analytics.cs +++ b/Assets/Tests/InputSystem/CoreTests_Analytics.cs @@ -458,7 +458,6 @@ public void Analytics_ShouldReportBuildAnalytics_WhenNotHavingSettingsAsset() Assert.That(data.feature_paranoid_read_value_caching_checks_enabled, Is.EqualTo(defaultSettings.IsFeatureEnabled(InputFeatureNames.kParanoidReadValueCachingChecks))); Assert.That(data.feature_disable_unity_remote_support, Is.EqualTo(defaultSettings.IsFeatureEnabled(InputFeatureNames.kDisableUnityRemoteSupport))); Assert.That(data.feature_run_player_updates_in_editmode, Is.EqualTo(defaultSettings.IsFeatureEnabled(InputFeatureNames.kRunPlayerUpdatesInEditMode))); - Assert.That(data.feature_use_imgui_editor_for_assets, Is.EqualTo(defaultSettings.IsFeatureEnabled(InputFeatureNames.kUseIMGUIEditorForAssets))); } finally { @@ -554,7 +553,6 @@ public void Analytics_ShouldReportBuildAnalytics_WhenHavingSettingsAssetWithCust Assert.That(data.feature_paranoid_read_value_caching_checks_enabled, Is.True); Assert.That(data.feature_disable_unity_remote_support, Is.True); Assert.That(data.feature_run_player_updates_in_editmode, Is.True); - Assert.That(data.feature_use_imgui_editor_for_assets, Is.True); } finally { diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputBuildAnalytic.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputBuildAnalytic.cs index ee986c9e16..dd719aa8f3 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputBuildAnalytic.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/Analytics/InputBuildAnalytic.cs @@ -195,9 +195,6 @@ public InputBuildAnalyticData(BuildReport report, InputSettings settings, InputS feature_paranoid_read_value_caching_checks_enabled = settings.IsFeatureEnabled(InputFeatureNames.kParanoidReadValueCachingChecks); - feature_use_imgui_editor_for_assets = - settings.IsFeatureEnabled(InputFeatureNames.kUseIMGUIEditorForAssets); - feature_disable_unity_remote_support = settings.IsFeatureEnabled(InputFeatureNames.kDisableUnityRemoteSupport); feature_run_player_updates_in_editmode = @@ -330,12 +327,6 @@ public InputBuildAnalyticData(BuildReport report, InputSettings settings, InputS /// public bool feature_paranoid_read_value_caching_checks_enabled; - /// - /// Represents internal feature flag - /// as defined in InputSystem 1.8.x. - /// - public bool feature_use_imgui_editor_for_assets; - /// /// Represents internal feature flag /// as defined in InputSystem 1.8.x. From 0b102b692dc99f4a185a4b8394b1596dd043acef Mon Sep 17 00:00:00 2001 From: Anthony Yakovlev Date: Fri, 14 Nov 2025 18:25:14 +0300 Subject: [PATCH 11/21] formatting --- .../InputSystem/Editor/InputParameterEditor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/InputParameterEditor.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/InputParameterEditor.cs index 7fa3dc1cf4..7a5bcf07d1 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/InputParameterEditor.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/InputParameterEditor.cs @@ -32,7 +32,7 @@ public abstract class InputParameterEditor /// It was mostly needed for the imgui-based editors and should be avoided now. /// Should be removed once we can release the next major version. /// - public void OnGUI() { } + public void OnGUI() {} /// /// Add visual elements for this parameter editor to a root VisualElement. From 20a0e2ab26b0c7a4175d7c10846cd3612c8b7af1 Mon Sep 17 00:00:00 2001 From: Anthony Yakovlev Date: Mon, 17 Nov 2025 17:34:52 +0300 Subject: [PATCH 12/21] exclude imgui setting --- Assets/Tests/InputSystem/CoreTests_Analytics.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Assets/Tests/InputSystem/CoreTests_Analytics.cs b/Assets/Tests/InputSystem/CoreTests_Analytics.cs index f97611fd42..a86829a939 100644 --- a/Assets/Tests/InputSystem/CoreTests_Analytics.cs +++ b/Assets/Tests/InputSystem/CoreTests_Analytics.cs @@ -506,7 +506,6 @@ public void Analytics_ShouldReportBuildAnalytics_WhenHavingSettingsAssetWithCust customSettings.SetInternalFeatureFlag(InputFeatureNames.kParanoidReadValueCachingChecks, true); customSettings.SetInternalFeatureFlag(InputFeatureNames.kDisableUnityRemoteSupport, true); customSettings.SetInternalFeatureFlag(InputFeatureNames.kRunPlayerUpdatesInEditMode, true); - customSettings.SetInternalFeatureFlag(InputFeatureNames.kUseIMGUIEditorForAssets, true); customSettings.SetInternalFeatureFlag(InputFeatureNames.kUseReadValueCaching, true); InputSystem.settings = customSettings; From c365f3417dfae2658b40de68ccc34813c1ccbb6e Mon Sep 17 00:00:00 2001 From: Anthony Yakovlev Date: Tue, 18 Nov 2025 10:54:20 +0300 Subject: [PATCH 13/21] Revert "what if we leave ongui only in the base class" This reverts commit 718c23ba54853d9e1224f53f77816f6be610a2bf. --- .../InputSystem/Editor/InputParameterEditor.cs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/InputParameterEditor.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/InputParameterEditor.cs index 7a5bcf07d1..6ef8f234ec 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/InputParameterEditor.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/InputParameterEditor.cs @@ -27,13 +27,6 @@ public abstract class InputParameterEditor /// public object target { get; internal set; } - /// - /// Callback for implementing a custom UI. - /// It was mostly needed for the imgui-based editors and should be avoided now. - /// Should be removed once we can release the next major version. - /// - public void OnGUI() {} - /// /// Add visual elements for this parameter editor to a root VisualElement. /// From d1b37dbf8a81e1e591503417fe86fd954a00e687 Mon Sep 17 00:00:00 2001 From: Anthony Yakovlev Date: Tue, 18 Nov 2025 10:54:30 +0300 Subject: [PATCH 14/21] Revert "let's see if we can get away with cutting the whole OnGUI method altogether" This reverts commit 5c56992acfdbbd39ee233fae1db9909262beebd5. --- Assets/Samples/CustomComposite/CustomComposite.cs | 4 ++++ .../InputSystem/Actions/Composites/AxisComposite.cs | 4 ++++ .../InputSystem/Actions/Composites/Vector2Composite.cs | 4 ++++ .../InputSystem/Actions/Composites/Vector3Composite.cs | 4 ++++ .../InputSystem/Actions/Interactions/HoldInteraction.cs | 4 ++++ .../InputSystem/Actions/Interactions/MultiTapInteraction.cs | 4 ++++ .../InputSystem/Actions/Interactions/PressInteraction.cs | 4 ++++ .../InputSystem/Actions/Interactions/SlowTapInteraction.cs | 4 ++++ .../InputSystem/Actions/Interactions/TapInteraction.cs | 4 ++++ .../InputSystem/Controls/Processors/AxisDeadzoneProcessor.cs | 4 ++++ .../Controls/Processors/StickDeadzoneProcessor.cs | 4 ++++ .../InputSystem/Editor/InputParameterEditor.cs | 5 +++++ 12 files changed, 49 insertions(+) diff --git a/Assets/Samples/CustomComposite/CustomComposite.cs b/Assets/Samples/CustomComposite/CustomComposite.cs index bc81f8b552..0cbd54c3e0 100644 --- a/Assets/Samples/CustomComposite/CustomComposite.cs +++ b/Assets/Samples/CustomComposite/CustomComposite.cs @@ -134,6 +134,10 @@ public override Vector2 ReadValue(ref InputBindingCompositeContext context) #if UNITY_EDITOR public class CustomCompositeEditor : InputParameterEditor { + public override void OnGUI() + { + } + public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) { var slider = new Slider(m_ScaleFactorLabel.text, 0, 2) diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/AxisComposite.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/AxisComposite.cs index 24b439dfb8..35c0a6f861 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/AxisComposite.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/AxisComposite.cs @@ -216,6 +216,10 @@ internal class AxisCompositeEditor : InputParameterEditor + "If 'Neither' is selected, the result is 0 (or, more precisely, " + "the midpoint between minValue and maxValue)."; + public override void OnGUI() + { + } + public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) { var modeField = new EnumField(label, target.whichSideWins) diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector2Composite.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector2Composite.cs index 18353a29b4..aa4fb50a4c 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector2Composite.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector2Composite.cs @@ -196,6 +196,10 @@ internal class Vector2CompositeEditor : InputParameterEditor + "treats part bindings as buttons (on/off) whereas Analog preserves " + "floating-point magnitudes as read from controls."; + public override void OnGUI() + { + } + public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) { var modeField = new EnumField(label, target.mode) diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector3Composite.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector3Composite.cs index 3b70843277..72371f81b3 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector3Composite.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector3Composite.cs @@ -176,6 +176,10 @@ internal class Vector3CompositeEditor : InputParameterEditor + "treats part bindings as buttons (on/off) whereas Analog preserves " + "floating-point magnitudes as read from controls."; + public override void OnGUI() + { + } + public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) { var modeField = new EnumField(label, target.mode) diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/HoldInteraction.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/HoldInteraction.cs index 3e31db79f9..45f08e261f 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/HoldInteraction.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/HoldInteraction.cs @@ -122,6 +122,10 @@ protected override void OnEnable() () => target.duration, x => target.duration = x, () => InputSystem.settings.defaultHoldTime); } + public override void OnGUI() + { + } + public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) { m_PressPointSetting.OnDrawVisualElements(root, onChangedCallback); diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/MultiTapInteraction.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/MultiTapInteraction.cs index b1e948e545..d068639dae 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/MultiTapInteraction.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/MultiTapInteraction.cs @@ -192,6 +192,10 @@ protected override void OnEnable() () => InputSystem.settings.defaultButtonPressPoint); } + public override void OnGUI() + { + } + public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) { var tapCountField = new IntegerField(tapLabel) diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/PressInteraction.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/PressInteraction.cs index 1a0646cb51..3b7c7a20b0 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/PressInteraction.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/PressInteraction.cs @@ -208,6 +208,10 @@ protected override void OnEnable() () => InputSystem.settings.defaultButtonPressPoint); } + public override void OnGUI() + { + } + public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) { root.Add(new HelpBox(helpLabel, HelpBoxMessageType.None)); diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/SlowTapInteraction.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/SlowTapInteraction.cs index 4934db6619..6d663989b5 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/SlowTapInteraction.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/SlowTapInteraction.cs @@ -85,6 +85,10 @@ protected override void OnEnable() () => InputSystem.settings.defaultButtonPressPoint); } + public override void OnGUI() + { + } + public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) { m_DurationSetting.OnDrawVisualElements(root, onChangedCallback); diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/TapInteraction.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/TapInteraction.cs index 66eeab3823..55d1ea856e 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/TapInteraction.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/TapInteraction.cs @@ -111,6 +111,10 @@ protected override void OnEnable() () => InputSystem.settings.defaultButtonPressPoint); } + public override void OnGUI() + { + } + public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) { m_DurationSetting.OnDrawVisualElements(root, onChangedCallback); diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/Processors/AxisDeadzoneProcessor.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/Processors/AxisDeadzoneProcessor.cs index c20dc61787..066eb2aaf4 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/Processors/AxisDeadzoneProcessor.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/Processors/AxisDeadzoneProcessor.cs @@ -90,6 +90,10 @@ protected override void OnEnable() () => InputSystem.settings.defaultDeadzoneMax); } + public override void OnGUI() + { + } + public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) { m_MinSetting.OnDrawVisualElements(root, onChangedCallback); diff --git a/Packages/com.unity.inputsystem/InputSystem/Controls/Processors/StickDeadzoneProcessor.cs b/Packages/com.unity.inputsystem/InputSystem/Controls/Processors/StickDeadzoneProcessor.cs index 3c6122bba5..1dec047010 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Controls/Processors/StickDeadzoneProcessor.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Controls/Processors/StickDeadzoneProcessor.cs @@ -79,6 +79,10 @@ protected override void OnEnable() () => InputSystem.settings.defaultDeadzoneMax); } + public override void OnGUI() + { + } + public override void OnDrawVisualElements(VisualElement root, Action onChangedCallback) { m_MinSetting.OnDrawVisualElements(root, onChangedCallback); diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/InputParameterEditor.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/InputParameterEditor.cs index 6ef8f234ec..2b5d28e7a7 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/InputParameterEditor.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/InputParameterEditor.cs @@ -27,6 +27,11 @@ public abstract class InputParameterEditor /// public object target { get; internal set; } + /// + /// Callback for implementing a custom UI. + /// + public abstract void OnGUI(); + /// /// Add visual elements for this parameter editor to a root VisualElement. /// From 360d69277c7f668e73a24c964fb9b43010c34996 Mon Sep 17 00:00:00 2001 From: Anthony Yakovlev Date: Tue, 18 Nov 2025 19:22:55 +0300 Subject: [PATCH 15/21] adjustment the changelog --- Packages/com.unity.inputsystem/CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index 21cddde19e..fac381f517 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -11,9 +11,10 @@ however, it has to be formatted properly to pass verification tests. ## [Unreleased] - yyyy-mm-dd ### Changed -- Project-Wide Input Actions support can no longer be disabled (removed the UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS define). (ISX-2397) +- Project-Wide Input Actions support can no longer compiled out (removed the UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS define). (ISX-2397) - Removed code that had to do with Unity versions older than Unity 2022.3 LTS. (ISX-2396) - Auto-save on focus lost can no longer be compiled out (ISX-2397) +- Deprecated the USE_IMGUI_EDITOR_FOR_ASSETS feature option (ISX-2397) ### Fixed - An issue where a UITK MouseEvent was triggered when changing from Scene View to Game View in the Editor has been fixed. [ISXB-1671](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1671) From d567d73fd55959194d2a2845f045cd530c622e29 Mon Sep 17 00:00:00 2001 From: Anthony Yakovlev Date: Wed, 19 Nov 2025 14:43:22 +0300 Subject: [PATCH 16/21] use valuetuple, from a review suggestion --- .../Editor/AssetEditor/ParameterListView.cs | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/ParameterListView.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/ParameterListView.cs index 75a36900ba..81fa7e7358 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/ParameterListView.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/ParameterListView.cs @@ -223,7 +223,7 @@ public void Initialize(Type registeredType, ReadOnlyArray existingPa m_ParameterEditor = null; // Create parameter labels. - m_ParameterLabels = new Tuple[m_Parameters.Length]; + m_ParameterLabels = new (string text, string tooltip)[m_Parameters.Length]; for (var i = 0; i < m_Parameters.Length; ++i) { // Look up tooltip from field. @@ -235,7 +235,7 @@ public void Initialize(Type registeredType, ReadOnlyArray existingPa // Create label. var niceName = ObjectNames.NicifyVariableName(m_Parameters[i].value.name); - m_ParameterLabels[i] = new Tuple(niceName, tooltip); + m_ParameterLabels[i] = (niceName, tooltip); } } } @@ -282,9 +282,9 @@ void OnEditEnd() if (selectedIndex < 0 || selectedIndex >= names.Count) selectedIndex = 0; - var field = new DropdownField(label.Item1, names, selectedIndex) + var field = new DropdownField(label.text, names, selectedIndex) { - tooltip = label.Item2 + tooltip = label.tooltip }; field.RegisterValueChangedCallback(evt => @@ -301,7 +301,7 @@ void OnEditEnd() else if (parameter.value.type == TypeCode.Int64 || parameter.value.type == TypeCode.UInt64) { var longValue = parameter.value.value.ToInt64(); - var field = new LongField(label.Item1) { value = longValue, tooltip = label.Item2 }; + var field = new LongField(label.text) { value = longValue, tooltip = label.tooltip }; field.RegisterValueChangedCallback(evt => OnValueChanged(ref parameter, evt.newValue, closedIndex)); field.RegisterCallback(_ => OnEditEnd()); root.Add(field); @@ -309,7 +309,7 @@ void OnEditEnd() else if (parameter.value.type.IsInt()) { var intValue = parameter.value.value.ToInt32(); - var field = new IntegerField(label.Item1) { value = intValue, tooltip = label.Item2 }; + var field = new IntegerField(label.text) { value = intValue, tooltip = label.tooltip }; field.RegisterValueChangedCallback(evt => OnValueChanged(ref parameter, evt.newValue, closedIndex)); field.RegisterCallback(_ => OnEditEnd()); root.Add(field); @@ -317,7 +317,7 @@ void OnEditEnd() else if (parameter.value.type == TypeCode.Single) { var floatValue = parameter.value.value.ToSingle(); - var field = new FloatField(label.Item1) { value = floatValue, tooltip = label.Item2 }; + var field = new FloatField(label.text) { value = floatValue, tooltip = label.tooltip }; field.RegisterValueChangedCallback(evt => OnValueChanged(ref parameter, evt.newValue, closedIndex)); field.RegisterCallback(_ => OnEditEnd()); root.Add(field); @@ -325,7 +325,7 @@ void OnEditEnd() else if (parameter.value.type == TypeCode.Double) { var floatValue = parameter.value.value.ToDouble(); - var field = new DoubleField(label.Item1) { value = floatValue, tooltip = label.Item2 }; + var field = new DoubleField(label.text) { value = floatValue, tooltip = label.tooltip }; field.RegisterValueChangedCallback(evt => OnValueChanged(ref parameter, evt.newValue, closedIndex)); field.RegisterCallback(_ => OnEditEnd()); root.Add(field); @@ -333,7 +333,7 @@ void OnEditEnd() else if (parameter.value.type == TypeCode.Boolean) { var boolValue = parameter.value.value.ToBoolean(); - var field = new Toggle(label.Item1) { value = boolValue, tooltip = label.Item2 }; + var field = new Toggle(label.text) { value = boolValue, tooltip = label.tooltip }; field.RegisterValueChangedCallback(evt => OnValueChanged(ref parameter, evt.newValue, closedIndex)); field.RegisterValueChangedCallback(_ => OnEditEnd()); root.Add(field); @@ -382,8 +382,7 @@ private void ReadParameterValuesFrom(object target) private InputParameterEditor m_ParameterEditor; private EditableParameterValue[] m_Parameters; - // .Item1 is text, .Item2 is tooltip - private Tuple[] m_ParameterLabels; + private (string text, string tooltip)[] m_ParameterLabels; private struct EditableParameterValue { From 07b953634b92034c3aaf17b5a4c1cee1182a8a16 Mon Sep 17 00:00:00 2001 From: Anthony Yakovlev Date: Wed, 19 Nov 2025 14:44:20 +0300 Subject: [PATCH 17/21] fix up grammar --- 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 fac381f517..879af6990d 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -11,7 +11,7 @@ however, it has to be formatted properly to pass verification tests. ## [Unreleased] - yyyy-mm-dd ### Changed -- Project-Wide Input Actions support can no longer compiled out (removed the UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS define). (ISX-2397) +- Project-Wide Input Actions support can no longer be compiled out (removed the UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS define). (ISX-2397) - Removed code that had to do with Unity versions older than Unity 2022.3 LTS. (ISX-2396) - Auto-save on focus lost can no longer be compiled out (ISX-2397) - Deprecated the USE_IMGUI_EDITOR_FOR_ASSETS feature option (ISX-2397) From 5459cd707e6facb767906683b4be665cffec580a Mon Sep 17 00:00:00 2001 From: Anthony Yakovlev Date: Wed, 19 Nov 2025 15:04:54 +0300 Subject: [PATCH 18/21] we don't need to call this I think --- .../Editor/UITKAssetEditor/Views/NameAndParametersListView.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/NameAndParametersListView.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/NameAndParametersListView.cs index c0f0bade83..5c58afb174 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/NameAndParametersListView.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/Views/NameAndParametersListView.cs @@ -171,8 +171,6 @@ public NameAndParametersListViewItem(VisualElement root, ParameterListView param var foldout = container.Q("Foldout"); foldout.text = parameterListView.name; parameterListView.OnDrawVisualElements(foldout); - - foldout.Add(new IMGUIContainer(parameterListView.OnGUI)); } } } From 9996eacd341c4d53e30b5b3926de3812511f30c8 Mon Sep 17 00:00:00 2001 From: Anthony Yakovlev Date: Wed, 19 Nov 2025 16:26:20 +0300 Subject: [PATCH 19/21] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Håkan Sidenvall --- Packages/com.unity.inputsystem/CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index 879af6990d..8460dc8fb8 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -11,10 +11,10 @@ however, it has to be formatted properly to pass verification tests. ## [Unreleased] - yyyy-mm-dd ### Changed -- Project-Wide Input Actions support can no longer be compiled out (removed the UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS define). (ISX-2397) +- Project-Wide Input Actions support can no longer be compiled out (removed the `UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS` define). (ISX-2397) - Removed code that had to do with Unity versions older than Unity 2022.3 LTS. (ISX-2396) - Auto-save on focus lost can no longer be compiled out (ISX-2397) -- Deprecated the USE_IMGUI_EDITOR_FOR_ASSETS feature option (ISX-2397) +- Deprecated the `USE_IMGUI_EDITOR_FOR_ASSETS` feature option (ISX-2397) ### Fixed - An issue where a UITK MouseEvent was triggered when changing from Scene View to Game View in the Editor has been fixed. [ISXB-1671](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1671) From 1b262b48ac18ece3aab4051c4c55f8c37e7ae5f4 Mon Sep 17 00:00:00 2001 From: Anthony Yakovlev Date: Thu, 20 Nov 2025 12:35:45 +0300 Subject: [PATCH 20/21] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Håkan Sidenvall --- .../InputSystem/Actions/Composites/AxisComposite.cs | 4 ++-- .../InputSystem/Actions/Composites/Vector2Composite.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/AxisComposite.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/AxisComposite.cs index 35c0a6f861..297ecb0c36 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/AxisComposite.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/AxisComposite.cs @@ -212,7 +212,7 @@ public enum WhichSideWins internal class AxisCompositeEditor : InputParameterEditor { private const string label = "Which Side Wins"; - private const string tooltip = "Determine which axis 'wins' if both are actuated at the same time. " + private const string tooltipText = "Determine which axis 'wins' if both are actuated at the same time. " + "If 'Neither' is selected, the result is 0 (or, more precisely, " + "the midpoint between minValue and maxValue)."; @@ -224,7 +224,7 @@ public override void OnDrawVisualElements(VisualElement root, Action onChangedCa { var modeField = new EnumField(label, target.whichSideWins) { - tooltip = tooltip + tooltip = tooltipText }; modeField.RegisterValueChangedCallback(evt => diff --git a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector2Composite.cs b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector2Composite.cs index aa4fb50a4c..a8568f8013 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector2Composite.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector2Composite.cs @@ -192,7 +192,7 @@ public enum Mode internal class Vector2CompositeEditor : InputParameterEditor { private const string label = "Mode"; - private const string tooltip = "How to synthesize a Vector2 from the inputs. Digital " + private const string tooltipText = "How to synthesize a Vector2 from the inputs. Digital " + "treats part bindings as buttons (on/off) whereas Analog preserves " + "floating-point magnitudes as read from controls."; @@ -204,7 +204,7 @@ public override void OnDrawVisualElements(VisualElement root, Action onChangedCa { var modeField = new EnumField(label, target.mode) { - tooltip = tooltip + tooltip = tooltipText }; modeField.RegisterValueChangedCallback(evt => From f3f4741b01a9f76a9ce05a3cc077a880e4bd3a23 Mon Sep 17 00:00:00 2001 From: Anthony Yakovlev Date: Thu, 20 Nov 2025 13:02:35 +0300 Subject: [PATCH 21/21] fixup formatting --- .../InputSystem/Editor/AssetEditor/ParameterListView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/ParameterListView.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/ParameterListView.cs index 81fa7e7358..9b38064796 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/ParameterListView.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/AssetEditor/ParameterListView.cs @@ -223,7 +223,7 @@ public void Initialize(Type registeredType, ReadOnlyArray existingPa m_ParameterEditor = null; // Create parameter labels. - m_ParameterLabels = new (string text, string tooltip)[m_Parameters.Length]; + m_ParameterLabels = new(string text, string tooltip)[m_Parameters.Length]; for (var i = 0; i < m_Parameters.Length; ++i) { // Look up tooltip from field.