Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions Assets/Samples/CustomComposite/CustomComposite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,6 @@ public class CustomCompositeEditor : InputParameterEditor<CustomComposite>
{
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)
Expand Down
1 change: 0 additions & 1 deletion Assets/Tests/InputSystem/CoreTests_Actions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<InputSettings>()))
Expand Down
3 changes: 0 additions & 3 deletions Assets/Tests/InputSystem/CoreTests_Analytics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -507,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;
Expand Down Expand Up @@ -554,7 +552,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
{
Expand Down
3 changes: 2 additions & 1 deletion Packages/com.unity.inputsystem/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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)

### 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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

#if UNITY_EDITOR
using System;
using UnityEditor;
using UnityEngine.InputSystem.Editor;
using UnityEngine.UIElements;
#endif
Expand Down Expand Up @@ -212,24 +211,20 @@
#if UNITY_EDITOR
internal class AxisCompositeEditor : InputParameterEditor<AxisComposite>
{
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 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).");
+ "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)

Check warning on line 225 in Packages/com.unity.inputsystem/InputSystem/Actions/Composites/AxisComposite.cs

View check run for this annotation

Codecov GitHub.com / codecov/patch

Packages/com.unity.inputsystem/InputSystem/Actions/Composites/AxisComposite.cs#L225

Added line #L225 was not covered by tests
{
tooltip = m_WhichAxisWinsLabel.tooltip
tooltip = tooltipText
};

modeField.RegisterValueChangedCallback(evt =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using UnityEngine.InputSystem.Utilities;

#if UNITY_EDITOR
using UnityEditor;
using UnityEngine.InputSystem.Editor;
using UnityEngine.UIElements;
#endif
Expand Down Expand Up @@ -192,24 +191,20 @@
#if UNITY_EDITOR
internal class Vector2CompositeEditor : InputParameterEditor<Vector2Composite>
{
private GUIContent m_ModeLabel = new GUIContent("Mode",
"How to synthesize a Vector2 from the inputs. Digital "
private const string label = "Mode";
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.");
+ "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)

Check warning on line 205 in Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector2Composite.cs

View check run for this annotation

Codecov GitHub.com / codecov/patch

Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector2Composite.cs#L205

Added line #L205 was not covered by tests
{
tooltip = m_ModeLabel.tooltip
tooltip = tooltipText
};

modeField.RegisterValueChangedCallback(evt =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using UnityEngine.InputSystem.Utilities;

#if UNITY_EDITOR
using UnityEditor;
using UnityEngine.InputSystem.Editor;
using UnityEngine.UIElements;
#endif
Expand Down Expand Up @@ -172,24 +171,20 @@
#if UNITY_EDITOR
internal class Vector3CompositeEditor : InputParameterEditor<Vector3Composite>
{
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)

Check warning on line 185 in Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector3Composite.cs

View check run for this annotation

Codecov GitHub.com / codecov/patch

Packages/com.unity.inputsystem/InputSystem/Actions/Composites/Vector3Composite.cs#L185

Added line #L185 was not covered by tests
{
tooltip = m_ModeLabel.tooltip
tooltip = tooltip
};

modeField.RegisterValueChangedCallback(evt =>
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -196,21 +194,14 @@

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)

Check warning on line 201 in Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/MultiTapInteraction.cs

View check run for this annotation

Codecov GitHub.com / codecov/patch

Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/MultiTapInteraction.cs#L201

Added line #L201 was not covered by tests
{
value = target.tapCount,
tooltip = m_TapCountLabel.tooltip
tooltip = tapTooltip
};
tapCountField.RegisterValueChangedCallback(evt =>
{
Expand All @@ -224,7 +215,8 @@
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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -213,21 +210,15 @@

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));

Check warning on line 217 in Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/PressInteraction.cs

View check run for this annotation

Codecov GitHub.com / codecov/patch

Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/PressInteraction.cs#L217

Added line #L217 was not covered by tests

var behaviourDropdown = new EnumField(s_PressBehaviorLabel.text, target.behavior)
var behaviourDropdown = new EnumField(triggerLabel, target.behavior)

Check warning on line 219 in Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/PressInteraction.cs

View check run for this annotation

Codecov GitHub.com / codecov/patch

Packages/com.unity.inputsystem/InputSystem/Actions/Interactions/PressInteraction.cs#L219

Added line #L219 was not covered by tests
{
tooltip = s_PressBehaviorLabel.tooltip
tooltip = triggerTooltip
};
behaviourDropdown.RegisterValueChangedCallback(evt =>
{
Expand All @@ -241,14 +232,13 @@

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
}
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using UnityEngine.Scripting;

#if UNITY_EDITOR
using UnityEngine.InputSystem.Editor;
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using UnityEngine.Scripting;

#if UNITY_EDITOR
using UnityEngine.InputSystem.Editor;
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -330,12 +327,6 @@ public InputBuildAnalyticData(BuildReport report, InputSettings settings, InputS
/// </summary>
public bool feature_paranoid_read_value_caching_checks_enabled;

/// <summary>
/// Represents internal feature flag <see cref="InputFeatureNames.kUseIMGUIEditorForAssets" />
/// as defined in InputSystem 1.8.x.
/// </summary>
public bool feature_use_imgui_editor_for_assets;

/// <summary>
/// Represents internal feature flag <see cref="InputFeatureNames.kDisableUnityRemoteSupport" />
/// as defined in InputSystem 1.8.x.
Expand Down
Loading