diff --git a/.yamato/config.metadata b/.yamato/config.metadata
index ef7afe67cd..2c53df8f10 100644
--- a/.yamato/config.metadata
+++ b/.yamato/config.metadata
@@ -9,7 +9,7 @@ editors:
- version: 6000.2
run_tvos: false
- version: trunk
- run_tvos: false
+ run_tvos: false
utr_install_win: curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr.bat --output utr.bat
utr_install_nix: curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr --output utr && chmod +x utr
@@ -57,18 +57,18 @@ platforms_nix:
installscript: unity-downloader-cli -c editor -c StandaloneSupport-IL2CPP --wait --fast -u
- name: linux
type: Unity::VM
- image: package-ci/ubuntu-20.04:v4.50.0
+ image: package-ci/ubuntu-20.04:v4
flavor: b1.large
instabilities_run: sh ./run_standalone_instability_detection-latest.sh ubuntu 0.5.1 || exit 0
- name: linux_standalone
type: Unity::VM
- image: package-ci/ubuntu-20.04:v4.50.0
+ image: package-ci/ubuntu-20.04:v4
flavor: b1.large
instabilities_run: sh ./run_standalone_instability_detection-latest.sh ubuntu 0.5.1 || exit 0
runtime: StandaloneLinux64
- name: linux_standalone_il2cpp
type: Unity::VM
- image: package-ci/ubuntu-20.04:v4.50.0
+ image: package-ci/ubuntu-20.04:v4
flavor: b1.large
instabilities_run: sh ./run_standalone_instability_detection-latest.sh ubuntu 0.5.1 || exit 0
runtime: StandaloneLinux64
@@ -78,7 +78,7 @@ scripting_backends:
- name: mono
- name: il2cpp
-ios_and_tvos_macos_bokken_image: package-ci/macos-13:v4.50.0
+ios_and_tvos_macos_bokken_image: package-ci/macos-13:v4
test_category:
- name: performance
diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md
index 876a0ccfcb..e4251c07ee 100644
--- a/Packages/com.unity.inputsystem/CHANGELOG.md
+++ b/Packages/com.unity.inputsystem/CHANGELOG.md
@@ -57,7 +57,6 @@ however, it has to be formatted properly to pass verification tests.
### Changed
- Changed enum value `Key.IMESelected` to obsolete which was not a real key. Please use the ButtonControl `imeSelected`.
-- Changed conditional guards inside Plugins/XR so that we don't unnecessarily wrap entire classes. This stops downstream packages from having to also wrap Input System objects with similar conditionals.
### Added
- Added support of F13-F24 keys. [UUM-44328](https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-44328)
diff --git a/Packages/com.unity.inputsystem/Documentation~/filter.yml b/Packages/com.unity.inputsystem/Documentation~/filter.yml
index ec90ba2c34..844f071c39 100644
--- a/Packages/com.unity.inputsystem/Documentation~/filter.yml
+++ b/Packages/com.unity.inputsystem/Documentation~/filter.yml
@@ -37,54 +37,3 @@ apiRules:
- exclude:
uidRegex: ^UnityEngine\.InputSystem\.InputSystem\.runInBackground$
type: Member
- - exclude:
- uidRegex: ^Unity\.XR\.Oculus\.Input(?:\..+)*$
- type: Namespace
- - exclude:
- uidRegex: ^Unity\.XR\.GoogleVr(?:\..+)*$
- type: Namespace
- - exclude:
- uidRegex: ^Unity\.XR\.OpenVR(?:\..+)*$
- type: Namespace
- - exclude:
- uidRegex: ^UnityEngine\.XR\.WindowsMR\.Input(?:\..+)*$
- type: Namespace
- - exclude:
- uidRegex: ^UnityEngine\.InputSystem\.XR\.Haptics(?:\..+)*$
- type: Namespace
- - exclude:
- uidRegex: ^UnityEngine\.InputSystem\.XR\.XRControllerWithRumble$
- type: Type
- - exclude:
- uidRegex: ^UnityEngine\.InputSystem\.XR\.XRControllerWithRumble\..*$
- type: Member
- - exclude:
- uidRegex: ^UnityEngine\.InputSystem\.XR\.XRSupport$
- type: Type
- - exclude:
- uidRegex: ^UnityEngine\.InputSystem\.XR\.XRSupport\..*$
- type: Member
- - exclude:
- uidRegex: ^UnityEngine\.InputSystem\.XR\.FeatureType$
- type: Type
- - exclude:
- uidRegex: ^UnityEngine\.InputSystem\.XR\.UsageHint$
- type: Type
- - exclude:
- uidRegex: ^UnityEngine\.InputSystem\.XR\.XRFeatureDescriptor$
- type: Type
- - exclude:
- uidRegex: ^UnityEngine\.InputSystem\.XR\.XRDeviceDescriptor$
- type: Type
- - exclude:
- uidRegex: ^UnityEngine\.InputSystem\.XR\.Bone$
- type: Type
- - exclude:
- uidRegex: ^UnityEngine\.InputSystem\.XR\.Eyes$
- type: Type
- - exclude:
- uidRegex: ^UnityEngine\.InputSystem\.XR\.BoneControl$
- type: Type
- - exclude:
- uidRegex: ^UnityEngine\.InputSystem\.XR\.EyesControl$
- type: Type
\ No newline at end of file
diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/GoogleVR.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/GoogleVR.cs
index ca156f0a8c..a4dab309ff 100644
--- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/GoogleVR.cs
+++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/GoogleVR.cs
@@ -1,5 +1,6 @@
-#if !DISABLE_BUILTIN_INPUT_SYSTEM_GOOGLEVR
+// ENABLE_VR is not defined on Game Core but the assembly is available with limited features when the XR module is enabled.
// Docs generation is skipped because these are intended to be replaced with the com.unity.xr.googlevr package.
+#if UNITY_INPUT_SYSTEM_ENABLE_XR && (ENABLE_VR || UNITY_GAMECORE) && !DISABLE_BUILTIN_INPUT_SYSTEM_GOOGLEVR && !UNITY_FORCE_INPUTSYSTEM_XR_OFF && !PACKAGE_DOCS_GENERATION
using UnityEngine.InputSystem.Controls;
using UnityEngine.InputSystem.Layouts;
using UnityEngine.InputSystem.XR;
diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/Oculus.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/Oculus.cs
index 9c8e0e65b5..8267c728d5 100644
--- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/Oculus.cs
+++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/Oculus.cs
@@ -1,5 +1,6 @@
-#if !DISABLE_BUILTIN_INPUT_SYSTEM_OCULUS
+// ENABLE_VR is not defined on Game Core but the assembly is available with limited features when the XR module is enabled.
// Docs generation is skipped because these are intended to be replaced with the com.unity.xr.oculus package.
+#if UNITY_INPUT_SYSTEM_ENABLE_XR && (ENABLE_VR || UNITY_GAMECORE) && !DISABLE_BUILTIN_INPUT_SYSTEM_OCULUS && !UNITY_FORCE_INPUTSYSTEM_XR_OFF && !PACKAGE_DOCS_GENERATION
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Controls;
using UnityEngine.InputSystem.Layouts;
diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/OpenVR.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/OpenVR.cs
index a099be99fc..c109b57989 100644
--- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/OpenVR.cs
+++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/OpenVR.cs
@@ -1,5 +1,6 @@
-#if !DISABLE_BUILTIN_INPUT_SYSTEM_OPENVR
+// ENABLE_VR is not defined on Game Core but the assembly is available with limited features when the XR module is enabled.
// Docs generation is skipped because these are intended to be replaced with the com.unity.xr.openvr package.
+#if UNITY_INPUT_SYSTEM_ENABLE_XR && (ENABLE_VR || UNITY_GAMECORE) && !DISABLE_BUILTIN_INPUT_SYSTEM_OPENVR && !UNITY_FORCE_INPUTSYSTEM_XR_OFF && !PACKAGE_DOCS_GENERATION
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Controls;
using UnityEngine.InputSystem.Layouts;
diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/WindowsMR.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/WindowsMR.cs
index d8b3513e9f..d018cd5f0a 100644
--- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/WindowsMR.cs
+++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Devices/WindowsMR.cs
@@ -1,5 +1,6 @@
-#if !DISABLE_BUILTIN_INPUT_SYSTEM_WINDOWSMR
+// ENABLE_VR is not defined on Game Core but the assembly is available with limited features when the XR module is enabled.
// Docs generation is skipped because these are intended to be replaced with the com.unity.xr.windowsmr package.
+#if UNITY_INPUT_SYSTEM_ENABLE_XR && (ENABLE_VR || UNITY_GAMECORE) && !DISABLE_BUILTIN_INPUT_SYSTEM_WINDOWSMR && !UNITY_FORCE_INPUTSYSTEM_XR_OFF && !PACKAGE_DOCS_GENERATION
using UnityEngine.InputSystem.Controls;
using UnityEngine.InputSystem.Layouts;
using UnityEngine.InputSystem.XR;
diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs
index f1c1666d28..cfbbb51f0a 100644
--- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs
+++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs
@@ -1,3 +1,5 @@
+// ENABLE_VR is not defined on Game Core but the assembly is available with limited features when the XR module is enabled.
+#if UNITY_INPUT_SYSTEM_ENABLE_XR && (ENABLE_VR || UNITY_GAMECORE) && !UNITY_FORCE_INPUTSYSTEM_XR_OFF || PACKAGE_DOCS_GENERATION
using UnityEngine.InputSystem.Controls;
using UnityEngine.InputSystem.XR.Haptics;
using UnityEngine.InputSystem.Layouts;
@@ -5,67 +7,46 @@
namespace UnityEngine.InputSystem.XR
{
- ///
- /// The base type of all XR head mounted displays. This can help organize shared behaviour across all HMDs.
- ///
- ///
- ///
- ///
- /// To give your head tracking an extra update before rendering:
- /// First, enable before render updates on your Device.
- ///
- /// // JSON
- /// {
- /// "name" : "MyHMD",
- /// "extend" : "HMD",
- /// "beforeRender" : "Update"
- /// }
- ///
- /// Then, make sure you put extra `StateEvents` for your HMD on the queue right in time before rendering. Also, if your HMD is a combination of non-tracking and tracking controls, you can update just the tracking by sending a delta event instead of a full state event.
- ///
- ///
[InputControlLayout(isGenericTypeOfDevice = true, displayName = "XR HMD", canRunInBackground = true)]
public class XRHMD : TrackedDevice
{
///
- /// Accessor for left eye position.
+ /// The base type of all XR head mounted displays. This can help organize shared behaviour across all HMDs.
///
+ ///
+ ///
+ ///
+ /// To give your head tracking an extra update before rendering:
+ /// First, enable before render updates on your Device.
+ ///
+ ///
+ ///
+ /// // JSON
+ /// {
+ /// "name" : "MyHMD",
+ /// "extend" : "HMD",
+ /// "beforeRender" : "Update"
+ /// }
+ ///
+ ///
+ ///
+ /// Then, make sure you put extra `StateEvents` for your HMD on the queue right in time before rendering. Also, if your HMD is a combination of non-tracking and tracking controls, you can update just the tracking by sending a delta event instead of a full state event.
+ ///
+ ///
+
[InputControl(noisy = true)]
public Vector3Control leftEyePosition { get; protected set; }
-
- ///
- /// Accessor for left eye rotation.
- ///
[InputControl(noisy = true)]
public QuaternionControl leftEyeRotation { get; protected set; }
-
- ///
- /// Accessor for right eye position.
- ///
[InputControl(noisy = true)]
public Vector3Control rightEyePosition { get; protected set; }
-
- ///
- /// Accessor for right eye rotation.
- ///
[InputControl(noisy = true)]
public QuaternionControl rightEyeRotation { get; protected set; }
-
- ///
- /// Accessor for center eye position.
- ///
[InputControl(noisy = true)]
public Vector3Control centerEyePosition { get; protected set; }
-
- ///
- /// Accessor for center eye rotation.
- ///
[InputControl(noisy = true)]
public QuaternionControl centerEyeRotation { get; protected set; }
- ///
- /// Override for FinishSetup().
- ///
protected override void FinishSetup()
{
base.FinishSetup();
@@ -91,12 +72,22 @@ public class XRController : TrackedDevice
///
/// If there is no left hand connected, this will be null.
/// This also matches any currently tracked device that contains the 'LeftHand' device usage.
- /// To set up an Action to specifically target
- /// the left-hand XR controller:
+ ///
+ ///
+ /// // To set up an Action to specifically target
+ /// // the left-hand XR controller:
+ ///
/// var action = new InputAction(binding: "/<XRController>{leftHand}/position");
- /// To make the left-hand XR controller behave like the right-hand one
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// // To make the left-hand XR controller behave like the right-hand one
/// var controller = XRController.leftHand;
/// InputSystem.SetUsage(controller, CommonUsages.RightHand);
+ ///
+ ///
///
public static XRController leftHand => InputSystem.GetDevice(CommonUsages.LeftHand);
@@ -106,13 +97,10 @@ public class XRController : TrackedDevice
/// If there is no left hand connected, this will be null. This also matches any currently tracked device that contains the 'RightHand' device usage.
public static XRController rightHand => InputSystem.GetDevice(CommonUsages.RightHand);
- ///
- /// Override for FinishSetup().
- ///
protected override void FinishSetup()
{
base.FinishSetup();
-#if UNITY_INPUT_SYSTEM_ENABLE_XR
+
var capabilities = description.capabilities;
var deviceDescriptor = XRDeviceDescriptor.FromJson(capabilities);
@@ -123,7 +111,6 @@ protected override void FinishSetup()
else if ((deviceDescriptor.characteristics & InputDeviceCharacteristics.Right) != 0)
InputSystem.SetDeviceUsage(this, CommonUsages.RightHand);
}
-#endif
}
}
@@ -132,11 +119,6 @@ protected override void FinishSetup()
///
public class XRControllerWithRumble : XRController
{
- ///
- /// Sends an impulse command with the given amplitude and duration.
- ///
- /// Amplitude of the impulse.
- /// Duration of the impulse.
public void SendImpulse(float amplitude, float duration)
{
var command = SendHapticImpulseCommand.Create(0, amplitude, duration);
@@ -144,3 +126,4 @@ public void SendImpulse(float amplitude, float duration)
}
}
}
+#endif
diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/BufferedRumble.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/BufferedRumble.cs
index cffe32f027..20bd60c591 100644
--- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/BufferedRumble.cs
+++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/BufferedRumble.cs
@@ -1,3 +1,5 @@
+// ENABLE_VR is not defined on Game Core but the assembly is available with limited features when the XR module is enabled.
+#if UNITY_INPUT_SYSTEM_ENABLE_XR && (ENABLE_VR || UNITY_GAMECORE) || PACKAGE_DOCS_GENERATION
namespace UnityEngine.InputSystem.XR.Haptics
{
public struct BufferedRumble
@@ -24,3 +26,4 @@ public void EnqueueRumble(byte[] samples)
}
}
}
+#endif
diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/GetCurrentHapticStateCommand.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/GetCurrentHapticStateCommand.cs
index beb7531cb1..c246037db7 100644
--- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/GetCurrentHapticStateCommand.cs
+++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/GetCurrentHapticStateCommand.cs
@@ -1,3 +1,5 @@
+// ENABLE_VR is not defined on Game Core but the assembly is available with limited features when the XR module is enabled.
+#if UNITY_INPUT_SYSTEM_ENABLE_XR && (ENABLE_VR || UNITY_GAMECORE) || PACKAGE_DOCS_GENERATION
using System.Runtime.InteropServices;
using UnityEngine.InputSystem.LowLevel;
using UnityEngine.InputSystem.Utilities;
@@ -45,3 +47,4 @@ public static GetCurrentHapticStateCommand Create()
}
}
}
+#endif
diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/GetHapticCapabilitiesCommand.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/GetHapticCapabilitiesCommand.cs
index f1b49f4e0b..670ccd158f 100644
--- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/GetHapticCapabilitiesCommand.cs
+++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/GetHapticCapabilitiesCommand.cs
@@ -1,3 +1,5 @@
+// ENABLE_VR is not defined on Game Core but the assembly is available with limited features when the XR module is enabled.
+#if UNITY_INPUT_SYSTEM_ENABLE_XR && (ENABLE_VR || UNITY_GAMECORE) || PACKAGE_DOCS_GENERATION
using System.Runtime.InteropServices;
using UnityEngine.InputSystem.LowLevel;
using UnityEngine.InputSystem.Utilities;
@@ -154,3 +156,4 @@ public static GetHapticCapabilitiesCommand Create()
}
}
}
+#endif
diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/SendBufferedHapticsCommand.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/SendBufferedHapticsCommand.cs
index cbea007992..577d38bbaf 100644
--- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/SendBufferedHapticsCommand.cs
+++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/SendBufferedHapticsCommand.cs
@@ -1,3 +1,5 @@
+// ENABLE_VR is not defined on Game Core but the assembly is available with limited features when the XR module is enabled.
+#if UNITY_INPUT_SYSTEM_ENABLE_XR && (ENABLE_VR || UNITY_GAMECORE) || PACKAGE_DOCS_GENERATION
using System.Runtime.InteropServices;
using UnityEngine.InputSystem.LowLevel;
using UnityEngine.InputSystem.Utilities;
@@ -51,3 +53,4 @@ public static SendBufferedHapticCommand Create(byte[] rumbleBuffer)
}
}
}
+#endif
diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/SendHapticImpulseCommand.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/SendHapticImpulseCommand.cs
index 8a979d2fef..e9985d9eca 100644
--- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/SendHapticImpulseCommand.cs
+++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/Haptics/SendHapticImpulseCommand.cs
@@ -1,3 +1,5 @@
+// ENABLE_VR is not defined on Game Core but the assembly is available with limited features when the XR module is enabled.
+#if UNITY_INPUT_SYSTEM_ENABLE_XR && (ENABLE_VR || UNITY_GAMECORE) || PACKAGE_DOCS_GENERATION
using System.Runtime.InteropServices;
using UnityEngine.InputSystem.LowLevel;
using UnityEngine.InputSystem.Utilities;
@@ -48,3 +50,4 @@ public static SendHapticImpulseCommand Create(int motorChannel, float motorAmpli
}
}
}
+#endif
diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRLayoutBuilder.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRLayoutBuilder.cs
index b5715ba6e8..3c3ef1aa31 100644
--- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRLayoutBuilder.cs
+++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRLayoutBuilder.cs
@@ -1,3 +1,5 @@
+// ENABLE_VR is not defined on Game Core but the assembly is available with limited features when the XR module is enabled.
+#if UNITY_INPUT_SYSTEM_ENABLE_XR && (ENABLE_VR || UNITY_GAMECORE) && !UNITY_FORCE_INPUTSYSTEM_XR_OFF
using System;
using System.Collections.Generic;
using UnityEngine.InputSystem.LowLevel;
@@ -88,7 +90,7 @@ internal static string OnFindLayoutForDevice(ref InputDeviceDescription descript
{
return null;
}
-#if UNITY_INPUT_SYSTEM_ENABLE_XR
+
if (string.IsNullOrEmpty(matchedLayout))
{
const InputDeviceCharacteristics controllerCharacteristics = InputDeviceCharacteristics.HeldInHand | InputDeviceCharacteristics.Controller;
@@ -97,7 +99,7 @@ internal static string OnFindLayoutForDevice(ref InputDeviceDescription descript
else if ((deviceDescriptor.characteristics & controllerCharacteristics) == controllerCharacteristics)
matchedLayout = "XRController";
}
-#endif
+
string layoutName;
if (string.IsNullOrEmpty(description.manufacturer))
{
@@ -339,3 +341,4 @@ private InputControlLayout Build()
}
}
}
+#endif
diff --git a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs
index 5a2721bfb2..bcf3818581 100644
--- a/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs
+++ b/Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs
@@ -1,3 +1,5 @@
+// ENABLE_VR is not defined on Game Core but the assembly is available with limited features when the XR module is enabled.
+#if UNITY_INPUT_SYSTEM_ENABLE_XR && (ENABLE_VR || UNITY_GAMECORE) || PACKAGE_DOCS_GENERATION
using System;
using System.Collections.Generic;
using UnityEngine.InputSystem.Layouts;
@@ -102,25 +104,20 @@ public class XRDeviceDescriptor
///
/// The capabilities of the device, used to help filter and identify devices that server a certain purpose (e.g. controller, or headset, or hardware tracker).
///
-#if UNITY_INPUT_SYSTEM_ENABLE_XR
public InputDeviceCharacteristics characteristics;
-#else
- [SerializeField]
- private uint characteristics;
-#endif
///
/// The underlying deviceId, this can be used with to create a device.
///
public int deviceId;
///
- /// A list of all input features.
+ /// A list of all input features.
///
public List inputFeatures;
///
/// Converts this structure to a JSON string.
///
- /// A JSON string.
+ ///
public string ToJson()
{
return JsonUtility.ToJson(this);
@@ -391,7 +388,7 @@ static class XRSupport
///
public static void Initialize()
{
-#if UNITY_INPUT_SYSTEM_ENABLE_XR && (ENABLE_VR || UNITY_GAMECORE) && !UNITY_FORCE_INPUTSYSTEM_XR_OFF
+#if !UNITY_FORCE_INPUTSYSTEM_XR_OFF
InputSystem.RegisterLayout("Pose");
InputSystem.RegisterLayout("Bone");
InputSystem.RegisterLayout("Eyes");
@@ -509,3 +506,4 @@ public static void Initialize()
}
}
}
+#endif