Skip to content

Commit d5dc8cc

Browse files
committed
Moving more things around that have a direct or indirect dependency on UIElements
Create a mechanism for the Editor to be able to register hooks in the runtime assembly.
1 parent be8a3ab commit d5dc8cc

File tree

159 files changed

+207
-28
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+207
-28
lines changed

Assets/Tests/InputSystem.Editor/ControlSchemeEditorTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public void RemoveRequirementCommand_RemovesDeviceRequirements()
4343
var state = TestData.editorState.Generate().With(selectedControlScheme: controlScheme);
4444

4545

46-
var newState = ControlSchemeCommands.RemoveDeviceRequirement(0)(in state);
46+
var newState = UnityEngine.InputSystem.Editor.ControlSchemeCommands.RemoveDeviceRequirement(0)(in state);
4747

4848

4949
Assert.That(newState.selectedControlScheme.deviceRequirements.Count, Is.EqualTo(1));

Assets/Tests/InputSystem/CoreTests_Editor.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
using UnityEngine.InputSystem.Users;
2424
using UnityEngine.InputSystem.Utilities;
2525
using UnityEngine.TestTools;
26+
using UnityEditor.InputSystem.Interactions;
2627

2728
#pragma warning disable CS0649
2829
partial class CoreTests

Assets/Tests/InputSystem/Unity.InputSystem.Tests.asmdef

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"rootNamespace": "",
44
"references": [
55
"Unity.InputSystem",
6+
"Unity.InputSystem.Editor",
67
"Unity.InputSystem.TestFramework",
78
"Unity.ugui",
89
"Unity.PackageManagerDocTools.Editor",

Packages/com.unity.inputsystem/Editor/Actions/AxisCompositeEditor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ internal class AxisCompositeEditor : InputParameterEditor<AxisComposite>
2020
public override void OnGUI()
2121
{
2222
#if UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS
23-
if (!InputSystem.settings.useIMGUIEditorForAssets) return;
23+
if (!UnityEngine.InputSystem.InputSystem.settings.useIMGUIEditorForAssets) return;
2424
#endif
2525
target.whichSideWins = (AxisComposite.WhichSideWins)EditorGUILayout.EnumPopup(m_WhichAxisWinsLabel, target.whichSideWins);
2626
}

Packages/com.unity.inputsystem/Editor/Actions/Interactions/HoldInteractionEditor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

2+
using System;
23
using UnityEngine.InputSystem.Controls;
34
using UnityEngine.InputSystem.Interactions;
45
#if UNITY_EDITOR
@@ -29,7 +30,7 @@ protected override void OnEnable()
2930
public override void OnGUI()
3031
{
3132
#if UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS
32-
if (!InputSystem.settings.useIMGUIEditorForAssets) return;
33+
if (!UnityEngine.InputSystem.InputSystem.settings.useIMGUIEditorForAssets) return;
3334
#endif
3435
m_PressPointSetting.OnGUI();
3536
m_DurationSetting.OnGUI();

Packages/com.unity.inputsystem/Editor/Actions/Interactions/MultiTapInteractionEditor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

2+
using System;
23
using UnityEngine;
34
using UnityEngine.InputSystem.Interactions;
45
#if UNITY_EDITOR
@@ -38,7 +39,7 @@ protected override void OnEnable()
3839
public override void OnGUI()
3940
{
4041
#if UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS
41-
if (!InputSystem.settings.useIMGUIEditorForAssets) return;
42+
if (!UnityEngine.InputSystem.InputSystem.settings.useIMGUIEditorForAssets) return;
4243
#endif
4344
target.tapCount = EditorGUILayout.IntField(m_TapCountLabel, target.tapCount);
4445
m_TapDelaySetting.OnGUI();

Packages/com.unity.inputsystem/Editor/Actions/Interactions/PressInteractionEditor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

2+
using System;
23
using UnityEngine;
34
using UnityEngine.InputSystem.Interactions;
45
#if UNITY_EDITOR
@@ -30,7 +31,7 @@ protected override void OnEnable()
3031
public override void OnGUI()
3132
{
3233
#if UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS
33-
if (!InputSystem.settings.useIMGUIEditorForAssets) return;
34+
if (!UnityEngine.InputSystem.InputSystem.settings.useIMGUIEditorForAssets) return;
3435
#endif
3536
EditorGUILayout.HelpBox(s_HelpBoxText);
3637
target.behavior = (PressBehavior)EditorGUILayout.EnumPopup(s_PressBehaviorLabel, target.behavior);

Packages/com.unity.inputsystem/Editor/Actions/Interactions/SlowTapInteractionEditor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

2+
using System;
23
using UnityEngine.InputSystem.Interactions;
34
#if UNITY_EDITOR
45
using UnityEngine.InputSystem.Editor;
@@ -27,7 +28,7 @@ protected override void OnEnable()
2728
public override void OnGUI()
2829
{
2930
#if UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS
30-
if (!InputSystem.settings.useIMGUIEditorForAssets) return;
31+
if (!UnityEngine.InputSystem.InputSystem.settings.useIMGUIEditorForAssets) return;
3132
#endif
3233
m_DurationSetting.OnGUI();
3334
m_PressPointSetting.OnGUI();

Packages/com.unity.inputsystem/Editor/Actions/Interactions/TapInteractionEditor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

2+
using System;
23
using UnityEngine.InputSystem.Interactions;
34
#if UNITY_EDITOR
45
using UnityEngine.InputSystem.Editor;
@@ -27,7 +28,7 @@ protected override void OnEnable()
2728
public override void OnGUI()
2829
{
2930
#if UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS
30-
if (!InputSystem.settings.useIMGUIEditorForAssets) return;
31+
if (!UnityEngine.InputSystem.InputSystem.settings.useIMGUIEditorForAssets) return;
3132
#endif
3233
m_DurationSetting.OnGUI();
3334
m_PressPointSetting.OnGUI();

Packages/com.unity.inputsystem/Editor/Actions/Vector2CompositeEditor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

2+
using System;
23
using UnityEngine;
34
using UnityEngine.InputSystem.Composites;
45
#if UNITY_EDITOR
@@ -19,7 +20,7 @@ internal class Vector2CompositeEditor : InputParameterEditor<Vector2Composite>
1920
public override void OnGUI()
2021
{
2122
#if UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS
22-
if (!InputSystem.settings.useIMGUIEditorForAssets) return;
23+
if (!UnityEngine.InputSystem.InputSystem.settings.useIMGUIEditorForAssets) return;
2324
#endif
2425
target.mode = (Vector2Composite.Mode)EditorGUILayout.EnumPopup(m_ModeLabel, target.mode);
2526
}

0 commit comments

Comments
 (0)