Skip to content

Commit ee8571d

Browse files
committed
PR Feedback
1 parent c22d1b1 commit ee8571d

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

Assets/Tests/InputSystem/Plugins/XRTests.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -473,8 +473,7 @@ private static InputDeviceDescription CreateSimpleDeviceDescriptionByRole(Device
473473
manufacturer = "Manufacturer",
474474
capabilities = new XRDeviceDescriptor
475475
{
476-
#if UNITY_2019_3_OR_NEWER
477-
#else
476+
#if !UNITY_2019_3_OR_NEWER
478477
deviceRole = role,
479478
#endif
480479
inputFeatures = new List<XRFeatureDescriptor>()
@@ -498,8 +497,7 @@ private static InputDeviceDescription CreateMangledNameDeviceDescription()
498497
manufacturer = "__Manufacturer::",
499498
capabilities = new XRDeviceDescriptor
500499
{
501-
#if UNITY_2019_3_OR_NEWER
502-
#else
500+
#if !UNITY_2019_3_OR_NEWER
503501
deviceRole = DeviceRole.Generic,
504502
#endif
505503

@@ -536,8 +534,7 @@ public static InputDeviceDescription CreateDeviceDescription()
536534
manufacturer = "XRManufacturer",
537535
capabilities = new XRDeviceDescriptor
538536
{
539-
#if UNITY_2019_3_OR_NEWER
540-
#else
537+
#if !UNITY_2019_3_OR_NEWER
541538
deviceRole = DeviceRole.Generic,
542539
#endif
543540
inputFeatures = new List<XRFeatureDescriptor>()
@@ -614,8 +611,7 @@ public static InputDeviceDescription CreateDeviceDescription()
614611
manufacturer = "XRManufacturer",
615612
capabilities = new XRDeviceDescriptor
616613
{
617-
#if UNITY_2019_3_OR_NEWER
618-
#else
614+
#if !UNITY_2019_3_OR_NEWER
619615
deviceRole = DeviceRole.Generic,
620616
#endif
621617
inputFeatures = new List<XRFeatureDescriptor>()

Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
using System;
22
using System.Collections.Generic;
3+
#if UNITY_INPUT_SYSTEM_ENABLE_XR
34
using UnityEngine.XR;
5+
#endif
46
using UnityEngine.InputSystem.Layouts;
57

68
namespace UnityEngine.InputSystem.XR
@@ -75,11 +77,13 @@ class XRDeviceDescriptor
7577
public string deviceName;
7678
public string manufacturer;
7779
public string serialNumber;
80+
#if UNITY_INPUT_SYSTEM_ENABLE_XR
7881
#if UNITY_2019_3_OR_NEWER
7982
public InputDeviceCharacteristics characteristics;
80-
#else
81-
public DeviceRole deviceRole;
82-
#endif
83+
#else //UNITY_2019_3_OR_NEWER
84+
public InputDeviceRole deviceRole;
85+
#endif //UNITY_2019_3_OR_NEWER
86+
#endif //UNITY_INPUT_SYSTEM_ENABLE_XR
8387
public int deviceId;
8488
public List<XRFeatureDescriptor> inputFeatures;
8589

Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRTemplateBuilder.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
using UnityEngine.InputSystem.Utilities;
55
using System.Text;
66
using UnityEngine.InputSystem.Layouts;
7+
#if UNITY_INPUT_SYSTEM_ENABLE_XR
78
using UnityEngine.XR;
9+
#endif
810

911
namespace UnityEngine.InputSystem.XR
1012
{

0 commit comments

Comments
 (0)