cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass the TestSubmitFramesWhenNotVisible test - Tried All sorts

Diegomh7
Honored Guest
Hi guys, 
  I'm stuck on the last test for my app, I've tried all sorts with no avail.  All I want to do it turn off cameras, audio and frames being submitted when the menu button is pressed on the rift so it freezes the app. 

I've tried disabling cameras in a foreach loop, disabling the player gameobject, ovr controllers all sorts.

I have a gameobject with a script attached to try and detect when the test will fire based on the HMD losing tracking.

Here's where I'm currently at, any help would be greatly appreciated.  

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class HMDCheck : MonoBehaviour
{

    public GameObject OVRCameraRig;

    private void Update()
    {
        if (!OVRManager.isHmdPresent)
        {
            OVRCameraRig.SetActive(false);
             Time.timeScale = 0f;
         }
        else
        {
            OVRCameraRig.SetActive(true);
            Time.timeScale = 1f;
        }
     }

 }

0 REPLIES 0