Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Getting the Oculus Guardian to show up in an app

Discussion in 'VR' started by redheadmenance, Apr 27, 2023.

  1. redheadmenance

    redheadmenance

    Joined:
    Aug 25, 2022
    Posts:
    1
    Hello,

    I am trying to make a tutorial in my game, and I want to show the user what their boundary is within the app. I am having issues getting it to work. I have disconnected my headset from the oculus link and used it standalone, however I am still struggling. Here is the script I am using.

    using UnityEngine;
    using System.Collections;
    using Oculus.Platform;

    public class Boundary : MonoBehaviour
    {
    void Start()
    {
    OVRManager.boundary.SetVisible(true);
    }

    void Update()
    {
    if (OVRInput.GetDown(OVRInput.Button.One))
    {
    OVRManager.boundary.SetVisible(!OVRManager.boundary.GetVisible());
    }
    }
    }

    Here is the Packages I am using.

    upload_2023-4-27_15-48-16.png upload_2023-4-27_15-48-28.png