• Hi Guest!

    This is a notice regarding recent upgrades to the Hub. Over the last month, we have added several new features to improve your experience.
    You can check out the details in our official announcement!

Solved I wonder what isOVR and isOpenVR are.

Feel

Well-known member
Featured Contributor
Messages
441
Reactions
1,897
Points
93
There are isOVR and isOpenVR in SuperController.singleton, I wonder what they mean.

At first, I thought that isOVR informs me of the VR environment.
However, some users do not seem to have this value working properly.
And there is also a value called isOpenVR, but I wonder what it is.
In my VR environment, the value comes out as false.

Also, are isOVR and isOpenVR supported only in the latest version of VaM?
 
Solution
S
you can also look at how vam is doing it:

C#:
protected void DetermineVRRig()
{
    Application.targetFrameRate = 300;
    if (VRDisabled)
    {
        SetMonitorRig();
        return;
    }
    string loadedDeviceName = XRSettings.loadedDeviceName;
    Debug.Log("XR device active is " + XRSettings.isDeviceActive);
    Debug.Log("XR device present is " + XRDevice.isPresent);
    Debug.Log("Loaded XR device is " + loadedDeviceName);
    Debug.Log("XR device model is " + XRDevice.model);
    Debug.Log("XR device refresh rate is " + XRDevice.refreshRate);
    if (!XRSettings.isDeviceActive || loadedDeviceName == null || loadedDeviceName == string.Empty)
    {
        SetMonitorRig();
    }
    else if (loadedDeviceName == "Oculus")
    {...
i use this to detect if it's vr, dunno if it's correct but seems to have worked so far
XRSettings.isDeviceActive && !string.IsNullOrEmpty(XRSettings.loadedDeviceName)

OVR is oculus's library and openvr is steam I think. If you're using isOVR it probably detects just oculus headsets
 
Upvote 0
i use this to detect if it's vr, dunno if it's correct but seems to have worked so far
XRSettings.isDeviceActive && !string.IsNullOrEmpty(XRSettings.loadedDeviceName)

OVR is oculus's library and openvr is steam I think. If you're using isOVR it probably detects just oculus headsets

I am using Oculus.
But I get the opposite information.

VR environment test (SteamVR)
isOVR = true
isOpenVR = false

When I searched, Unity said that it was possible to check the following, so I am trying it. do you know anything
"UnityEngine.XR.XRDevice.isPresent"
 
Upvote 0
you can also look at how vam is doing it:

C#:
protected void DetermineVRRig()
{
    Application.targetFrameRate = 300;
    if (VRDisabled)
    {
        SetMonitorRig();
        return;
    }
    string loadedDeviceName = XRSettings.loadedDeviceName;
    Debug.Log("XR device active is " + XRSettings.isDeviceActive);
    Debug.Log("XR device present is " + XRDevice.isPresent);
    Debug.Log("Loaded XR device is " + loadedDeviceName);
    Debug.Log("XR device model is " + XRDevice.model);
    Debug.Log("XR device refresh rate is " + XRDevice.refreshRate);
    if (!XRSettings.isDeviceActive || loadedDeviceName == null || loadedDeviceName == string.Empty)
    {
        SetMonitorRig();
    }
    else if (loadedDeviceName == "Oculus")
    {
        SetOculusRig();
    }
    else
    {
        SetOpenVRRig();
    }
}
 
Upvote 0
Solution
you can also look at how vam is doing it:

C#:
protected void DetermineVRRig()
{
    Application.targetFrameRate = 300;
    if (VRDisabled)
    {
        SetMonitorRig();
        return;
    }
    string loadedDeviceName = XRSettings.loadedDeviceName;
    Debug.Log("XR device active is " + XRSettings.isDeviceActive);
    Debug.Log("XR device present is " + XRDevice.isPresent);
    Debug.Log("Loaded XR device is " + loadedDeviceName);
    Debug.Log("XR device model is " + XRDevice.model);
    Debug.Log("XR device refresh rate is " + XRDevice.refreshRate);
    if (!XRSettings.isDeviceActive || loadedDeviceName == null || loadedDeviceName == string.Empty)
    {
        SetMonitorRig();
    }
    else if (loadedDeviceName == "Oculus")
    {
        SetOculusRig();
    }
    else
    {
        SetOpenVRRig();
    }
}

thank you so much!!!
 
Upvote 0
Back
Top Bottom