Troubleshooting
⚠ NOTICE |
This legacy plugin is no longer being updated and maintained, please develop mobile content with OpenXR 2-in-1 Unity / Unreal package . |
Please reference the following resources for assistance with various common issues.
1. The imported Controller sample from OpenXR package cannot switch "Desired Tracking Origin".
Modify the
TrackingModeOrigin.cs
line.81 from & to &&.
2. The application does NOT run in VR mode.
Please check the following factors in your Unity project:
- Ensure that there is least one interaction profile
- Ensure OpenXR permission is added in AndroidManifest
<uses-permission android:name="org.khronos.openxr.permission.OPENXR" />
<uses-permission android:name="org.khronos.openxr.permission.OPENXR_SYSTEM" />
- Ensure your main activity’s intent filter includes the IMMERSIVE_HMD category: in AndroidManifest.xml
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="org.khronos.openxr.intent.category.IMMERSIVE_HMD"/>
- Ensure libopenxr_loader.so is imported in Plugins/Android
3. The OpenXR 1.3.1* Controller sample uses Left controller’s pose on Right Aim/Grip GUIs. You have to configure the path as below.
*not an issue with the latest version - please update
4. The imported Controller sample dropdown list cannot be clicked when using Input System v1.2.0.
The root cause is that the
Input System (1.2.0) UI Input Module
does NOT send the
Click event.
To click the dropdown list, we can send the
Submit
event instead of
Click
event. However, the
Submit
event is sent only when the target object already received a
Down
event. We need to send a
Down
event before sending a
Submit
event. To accomplish the event flow, we need to send a
Down
event when the trigger axis is bigger than 0.5f and send a
Submit
event then the trigger key is pressed. Follow the steps below:
<path_to_sample>/ControllerSampleActions.inputactions.
5. For Unity OpenXR single-pass Vulkan case, there will be a Visibility Mask on the right eye.
(This issue is solved after VIVE OpenXR plugin 1.0.3 and higher - please update)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class WorkAroundProvider : MonoBehaviour
{
[Tooltip("Enable this to prevent the occlusion mask of the right eye from showing when using Vulkan and Single pass")]
public bool FixOcclusionMaskOnRightEye = true;
void Start()
{
if (FixOcclusionMaskOnRightEye)
{
StartCoroutine(DisablingOcclusion());
}
}
private void OnApplicationPause(bool pause)
{
if (!pause)
{
StartCoroutine(DisablingOcclusion());
}
}
IEnumerator DisablingOcclusion()
{
for (int i=0; i < 5; i++)
{
yield return new WaitForEndOfFrame();
}
XR Settings.occlusionMaskScale = 0.0f;
}
}