Skip to content

Commit b4a2c64

Browse files
committed
Allow you to disable OpenXR detection
1 parent 3a608e2 commit b4a2c64

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Assets/VRstudios/XRInput/XRInput.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,14 @@ private IEnumerator Start()
111111
{
112112
if (loaderTypeName == "OpenXRLoader")
113113
{
114+
#if !XRINPUT_DISABLE_OPENXR
114115
string platformName = UnityEngine.XR.OpenXR.OpenXRRuntime.name;
115116
Debug.Log($"OpenXR platform name '{platformName}'");
116117
if (platformName == "Oculus") apiType = XRInputAPIType.OculusXR;
117118
else apiType = XRInputAPIType.UnityEngine_XR;
119+
#else
120+
throw new NotSupportedException("You have XRINPUT_DISABLE_OPENXR enabled");
121+
#endif
118122
}
119123
else if (loaderTypeName == "OculusLoader")
120124
{

0 commit comments

Comments
 (0)