Skip to content

Commit 9c3e951

Browse files
committed
Add back UNITY_EDITOR guards to Editor code
There's no Editor assembly anymore so we need to make sure this code is not compiled when building players.
1 parent bf8738c commit 9c3e951

17 files changed

+33
-17
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
#if UNITY_EDITOR
12
using System;
23
using UnityEditor;
34
using UnityEngine.InputSystem.Editor;
45
using UnityEngine.UIElements;
56

67
namespace UnityEngine.InputSystem.Composites
78
{
8-
#if UNITY_EDITOR
99
internal class AxisCompositeEditor : InputParameterEditor<AxisComposite>
1010
{
1111
private GUIContent m_WhichAxisWinsLabel = new GUIContent("Which Side Wins",
@@ -37,5 +37,5 @@ public override void OnDrawVisualElements(VisualElement root, Action onChangedCa
3737
root.Add(modeField);
3838
}
3939
}
40-
#endif
4140
}
41+
#endif

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
#if UNITY_EDITOR
12
using System;
23
using UnityEditor;
34
using UnityEngine.InputSystem.Editor;
45
using UnityEngine.UIElements;
56

67
namespace UnityEngine.InputSystem.Composites
78
{
8-
#if UNITY_EDITOR
99
internal class Vector2CompositeEditor : InputParameterEditor<Vector2Composite>
1010
{
1111
private GUIContent m_ModeLabel = new GUIContent("Mode",
@@ -37,5 +37,5 @@ public override void OnDrawVisualElements(VisualElement root, Action onChangedCa
3737
root.Add(modeField);
3838
}
3939
}
40-
#endif
4140
}
41+
#endif

Packages/com.unity.inputsystem/InputSystem/Editor/Actions/Composites/Vector3CompositeEditor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
#if UNITY_EDITOR
12
using System;
23
using UnityEditor;
34
using UnityEngine.InputSystem.Editor;
45
using UnityEngine.UIElements;
56

67
namespace UnityEngine.InputSystem.Composites
78
{
8-
#if UNITY_EDITOR
99
internal class Vector3CompositeEditor : InputParameterEditor<Vector3Composite>
1010
{
1111
private GUIContent m_ModeLabel = new GUIContent("Mode",
@@ -37,5 +37,5 @@ public override void OnDrawVisualElements(VisualElement root, Action onChangedCa
3737
root.Add(modeField);
3838
}
3939
}
40-
#endif
4140
}
41+
#endif

Packages/com.unity.inputsystem/InputSystem/Editor/Actions/InputControlSchemeEditorExtensions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if UNITY_EDITOR
12
using System.Collections.Generic;
23
using UnityEditor;
34

@@ -35,3 +36,4 @@ public static InputControlScheme FromSerializedProperty(SerializedProperty sp)
3536
}
3637
}
3738
}
39+
#endif

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
#if UNITY_EDITOR
12
using System;
23
using UnityEngine.InputSystem.Controls;
34
using UnityEngine.InputSystem.Editor;
45
using UnityEngine.UIElements;
56

67
namespace UnityEngine.InputSystem.Interactions
78
{
8-
#if UNITY_EDITOR
99
/// <summary>
1010
/// UI that is displayed when editing <see cref="HoldInteraction"/> in the editor.
1111
/// </summary>
@@ -43,5 +43,5 @@ public override void OnDrawVisualElements(VisualElement root, Action onChangedCa
4343
private CustomOrDefaultSetting m_DurationSetting;
4444
private CustomOrDefaultSetting m_PressPointSetting;
4545
}
46-
#endif
4746
}
47+
#endif

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1+
#if UNITY_EDITOR
12
using System;
23
using UnityEditor;
34
using UnityEngine.InputSystem.Editor;
45
using UnityEngine.UIElements;
56

67
namespace UnityEngine.InputSystem.Interactions
78
{
8-
#if UNITY_EDITOR
99
/// <summary>
10-
/// UI that is displayed when editing <see cref="HoldInteraction"/> in the editor.
10+
/// UI that is displayed when editing <see cref="MultiTapInteraction"/> in the editor.
1111
/// </summary>
1212
internal class MultiTapInteractionEditor : InputParameterEditor<MultiTapInteraction>
1313
{
@@ -68,5 +68,5 @@ public override void OnDrawVisualElements(VisualElement root, Action onChangedCa
6868
private CustomOrDefaultSetting m_TapTimeSetting;
6969
private CustomOrDefaultSetting m_TapDelaySetting;
7070
}
71-
#endif
7271
}
72+
#endif

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
#if UNITY_EDITOR
12
using System;
23
using UnityEditor;
34
using UnityEngine.InputSystem.Editor;
45
using UnityEngine.UIElements;
56

67
namespace UnityEngine.InputSystem.Interactions
78
{
8-
#if UNITY_EDITOR
99
/// <summary>
1010
/// UI that is displayed when editing <see cref="PressInteraction"/> in the editor.
1111
/// </summary>
@@ -63,5 +63,5 @@ public override void OnDrawVisualElements(VisualElement root, Action onChangedCa
6363
+ "With ReleaseOnly, the action is performed on release. With PressAndRelease, the action is performed on press and "
6464
+ "canceled on release.");
6565
}
66-
#endif
6766
}
67+
#endif

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if UNITY_EDITOR
12
using System;
23
using UnityEngine.InputSystem.Editor;
34
using UnityEngine.UIElements;
@@ -42,3 +43,4 @@ public override void OnDrawVisualElements(VisualElement root, Action onChangedCa
4243
private CustomOrDefaultSetting m_PressPointSetting;
4344
}
4445
}
46+
#endif

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if UNITY_EDITOR
12
using System;
23
using UnityEngine.InputSystem.Editor;
34
using UnityEngine.UIElements;
@@ -42,3 +43,4 @@ public override void OnDrawVisualElements(VisualElement root, Action onChangedCa
4243
private CustomOrDefaultSetting m_PressPointSetting;
4344
}
4445
}
46+
#endif

Packages/com.unity.inputsystem/InputSystem/Editor/Devices/Remote/RemoteInputPlayerConnectionEditor.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if UNITY_EDITOR
12
using UnityEditor;
23

34
namespace UnityEngine.InputSystem.Editor
@@ -24,3 +25,4 @@ public static RemoteInputPlayerConnection GetInstance()
2425
}
2526
}
2627
}
28+
#endif

0 commit comments

Comments
 (0)