Skip to content

Commit 351b3e4

Browse files
authored
FIX: XR-related compile errors on consoles (#1260).
1 parent a0b21ba commit 351b3e4

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

Assets/QA/Tests/XRDeviceActions/_SharedScripts/Handedness.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if ENABLE_VR || ENABLE_AR
12
using UnityEngine;
23
using UnityEngine.InputSystem;
34
using UnityEngine.UI;
@@ -24,3 +25,4 @@ public void Update()
2425
statusText.text = handedness;
2526
}
2627
}
28+
#endif

Assets/QA/Tests/XRHaptics/XRHaptics.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
#if ENABLE_VR || ENABLE_AR
12
using UnityEngine;
23
using UnityEngine.InputSystem;
34
using UnityEngine.InputSystem.XR;
4-
55
using UnityEngine.UI;
66

77
public class XRHaptics : MonoBehaviour
@@ -90,3 +90,5 @@ private void UpdateTimer()
9090
}
9191
}
9292
}
93+
94+
#endif

Assets/Tests/InputSystem/Plugins/XRTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if UNITY_EDITOR || UNITY_STANDALONE || UNITY_ANDROID || UNITY_IOS || UNITY_WSA
1+
#if (UNITY_EDITOR || UNITY_STANDALONE || UNITY_ANDROID || UNITY_IOS || UNITY_WSA) && (ENABLE_VR || ENABLE_AR)
22
using System;
33
using NUnit.Framework;
44
using System.Collections.Generic;
@@ -826,4 +826,4 @@ public void Controls_XRAxisControls_AreClampedToOneMagnitude()
826826
Assert.That((device["Vector2/y"] as AxisControl).EvaluateMagnitude(), Is.EqualTo(1f).Within(0.0001f));
827827
}
828828
}
829-
#endif // UNITY_EDITOR || UNITY_STANDALONE || UNITY_ANDROID || UNITY_IOS || UNITY_WSA
829+
#endif // (UNITY_EDITOR || UNITY_STANDALONE || UNITY_ANDROID || UNITY_IOS || UNITY_WSA) && (ENABLE_VR || ENABLE_AR)

Packages/com.unity.inputsystem/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ however, it has to be formatted properly to pass verification tests.
2727
- Fixed action with multiple bindings getting stuck in `Performed` state when two or more controls are pressed at the same time ([case 1295535](https://issuetracker.unity3d.com/issues/input-system-not-registering-multiple-inputs)).
2828
* Regression introduced in 1.1-preview.2.
2929
- Fixed `Touch.activeTouches` having incorrect touch phases after calling `EnhancedTouch.Disable()` and then `EnhancedTouch.Enable()` ([case 1286865](https://issuetracker.unity3d.com/issues/new-input-system-began-moved-and-ended-touch-phases-are-not-reported-when-a-second-scene-is-loaded)).
30+
- Fixed compile errors related to XR/AR on console platforms.
3031

3132
#### Actions
3233

0 commit comments

Comments
 (0)