Troubleshooting
Please refer to 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 Modify AndroidManifestProcess.cs
var md = ManifestElement.AppendChild(CreateElement("uses-permission"));
md.Attributes.Append(CreateAndroidAttribute("name", "org.khronos.openxr.permission.OPENXR"));
md = ManifestElement.AppendChild(CreateElement("uses-permission"));
md.Attributes.Append(CreateAndroidAttribute("name", "org.khronos.openxr.permission.OPENXR_SYSTEM"));
• Ensure your main activity’s intent filter includes the IMMERSIVE_HMD category: in AndroidManifestProcess.cs
var md2 = IntetnFilterElement.AppendChild(CreateElement("category"));
md2.Attributes.Append(CreateAndroidAttribute("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:
a. Open the <path_to_sample>/ControllerSampleActions.inputactions.
b. Select the Actions Maps “UI” and add an action named “Down” with the Action Type “Value” as well as Control Type “Analog”.
c. Select the “Path“ to add a binding.
d. Set the binding path to “trigger [XR Controller]” by specifying the Path to XR Controller > Optional Controls > trigger.
e. Click the Interactions “+” to add a “Press” interaction.
f. Click “Save Asset” to finish.
g. In ControllerSample > EventSystem, set the Left Click to “UI / Down” and Submit to “UI / Click”.
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;
}
}