cancel
Showing results for 
Search instead for 
Did you mean: 

Please help related to Unity XR for our VR game

yftindia
Level 2

Hi,
We are working on a Oculus Rift title using the Unity XR Plugin framework and the XR Interaction toolkit. For handling Oculus VRC requirements, we're using the Oculus SDK as well with the OVRManager present in the scene along with the XR Prefab.

However, our app has failed a couple of requirements in the VRC requirements checklist.
1. VRC.PC.Functional.3 - Single player apps must pause when the user removes the HMD or opens Dash.
2. VRC.PC.Input.1 - The apps must not submit frames or accept input when the user removes the HMD or opens the dash.

The code that checks whether the dash is open or the HMD is removed is given below. We are using the OVRManager.hasInputFocus and OVRManager.hasVRFocus to detect whether the Oculus VR device has focus or not.

[SerializeField] private List<XRController> controllers = null;
public XRRig CameraRig;
public GameObject fadeSphere;
public static bool isPaused = false;
private void Update()
{
//Dash open or headset not on head.
if (!OVRManager.hasInputFocus || !OVRManager.hasVrFocus)
{

Time.timeScale = 0;
CameraRig.enabled = false;
fadeSphere.SetActive(true);
foreach (GameObject go in XRcontrollers)
go.SetActive(false);

isPaused = true;
}
else
{
Time.timeScale = 1;
CameraRig.enabled = true;
fadeSphere.SetActive(false);
foreach (GameObject go in XRcontrollers)
go.SetActive(true);
}
}

private void OnApplicationFocus(bool focus)
{
if (!focus) {
PauseGame();
.
.
.
isPaused = true;
}
}


The above code works properly, as far as pausing is concerned the application is not receiving any input and getting paused as well. Yet we have received there error codes during the Oculus app submission phase.

Unity version: Unity 2019.4.15f1
Oculus Integration SDK version: v31.2
XR plugin version: v4.0.1
XR Interaction Toolkit version: v0.10.0-preview.7

Can anyone help us out?

 

Please help with solution.

 

Thanks

0 REPLIES 0