Skip to main content
New Participant
September 21, 2018

OVRHeadsetEmulator doesn't move the view in the Game panel

Hello,

I would like to be able to emulate the headset while developing in Unity, so I don't have to build to a device whenever I want to test. However, the OVR Headset Emulator doesn't move the view in the Game panel during play mode. The values of Head Pose Relative Offset Rotation are changing in the script, but I can't move the camera around to look at different things or interact with the UI. I have tried using Unity 2018.2.7, 2018.2.2, and 2017.4.11, and Oculus Integration 1.29. 

Am I missing something? Has anyone else encountered this?

Thank you kindly.
This topic has been closed for replies.

26 replies

New Participant
April 11, 2020
This doesnt seem to be working so simply any more. @filipefmiranda - Dont suppose you know of a new fix?
New Participant
May 7, 2020
Is there an alternative emulator that can be used with XR Toolkit?
New Participant
May 24, 2020
I don't know if this is at all in line with the comments above. I am a newby.

I am trying to learn how to develop for Oculus Quest. I followed the setup instructions, created a simple Unity project, dropped in the OVRCameraRig and was able to build and run on the Quest, with head tracking working appropriately on the HMD.

I then wanted to debug some code using OVR Headset Emulator, but I could not get it to respond. With some debugging statements put in place I was able to determine that OVRManager was not being initialized, which seems to be in line with what was reported above. I tried to follow the hints above. No luck, but that may have been my lack of familiarity with a lot of what is mentioned.

In the end, I went into Edit->Project Settings->XR Plugin Management. By default, the android tab was selected and I had checked Oculus as a Plug-in provider. But I had not done so on the desktop tap. Checking "Oculus" as a plug-in provider there as well was all that I needed in order to get the OVR Headset Emulator functionality to work while running my application in the Game window of the Unity editor.

I am using Unity 2019.3.14f1 Personal and I started here, so I may have been lucky that I am not trying to get code that was functional on older versions to work here. I have seen a number of comments in the code about legacy issues, but I can't say that I understand them nor whether I am using the old or the new way.
New Participant
June 2, 2020


OVRManager.cs
Seems to be a not "!" messing , OVRPlugin.initialized is set to true inside InitOVRManager().
so the test should be is  OVRPlugin.initialized == false is so call InitOVRManager().

private void Awake()
{
//If OVRPlugin is initialized on Awake(), or if the device is OpenVR, OVRManager should be initialized right away.
if (!OVRPlugin.initialized || (Settings.enabled && Settings.loadedDeviceName == OPENVR_UNITY_NAME_STR))
{
InitOVRManager();
}
}


Works like a charms! Using Unity 2019.3.10f1 and Oculus 1.3.4
New Participant
June 9, 2020


OVRManager.cs
Seems to be a not "!" messing , OVRPlugin.initialized is set to true inside InitOVRManager().
so the test should be is  OVRPlugin.initialized == false is so call InitOVRManager().

private void Awake()
{
//If OVRPlugin is initialized on Awake(), or if the device is OpenVR, OVRManager should be initialized right away.
if (!OVRPlugin.initialized || (Settings.enabled && Settings.loadedDeviceName == OPENVR_UNITY_NAME_STR))
{
InitOVRManager();
}
}


Thanks @filipefmiranda - worked for me, too. Unity 2019.3.11f1 + Oculus Integration v17.0
Participant
December 7, 2020

muhr2 said:



OVRManager.cs
Seems to be a not "!" messing , OVRPlugin.initialized is set to true inside InitOVRManager().
so the test should be is  OVRPlugin.initialized == false is so call InitOVRManager().

private void Awake()
{
//If OVRPlugin is initialized on Awake(), or if the device is OpenVR, OVRManager should be initialized right away.
if (!OVRPlugin.initialized || (Settings.enabled && Settings.loadedDeviceName == OPENVR_UNITY_NAME_STR))
{
InitOVRManager();
}
}


Thanks @filipefmiranda - worked for me, too. Unity 2019.3.11f1 + Oculus Integration v17.0


Same in Unity 2020.1.10f1 + OVRPlugin v 1.52.5
File: OVRManager.cs
...
private void Awake()
    {
#if !USING_XR_SDK
        //For legacy, we should initialize OVRManager in all cases.
        //For now, in XR SDK, only initialize if OVRPlugin is initialized.
        InitOVRManager();
#else
//after adding the "!". The following IF-Statement works fine 
        if (!OVRPlugin.initialized)
            InitOVRManager();
#endif
    }

...

Thanks @filipefmiranda and the others for the intitial hint :)
New Participant
April 8, 2021

This bug is there for a long time! Why doesn't Oculus fix this?!?

New Participant
January 24, 2021
Checking oculus for the desktop XR plugin worked for me too. Thanks @frenchjam

New Participant
July 4, 2021

What a weird specific bug to still exist 3 years later.  Thanks for the help, y'all!

New Participant
April 25, 2023

still there in 2023 as well

New Participant
September 16, 2021

I played UnityEditor using Oculus Link and it worked fine. I have not changed any code.

 

I think this is not a bug.  This is because it didn't work when I wasn't using Oculus Link initially, but it worked after I enabled OculusLink.

 

Runtime Environment :
Unity v.2020.3Unity v.2020.3.17f1
OculusIntegration v.32

Participant
February 16, 2023

Same issue after upgrading Unity from 2019 to 2021 LTS and Oculus Integration package to 49.0.
Indeed, as suggested by @filipefmiranda, "fixing" 

OVRManager.Awake()

in OVRManager.cs seems to be the solution. IMHO it's because when using OpenXR SDK InitOVRManager() is called only if OVRPlugin is intialized, but it should be called too if you're running the app in the Unity editor, here is fix suggestion:

    // Oculus/VR/Scripts/OVRMajnager.cs
    private void Awake()
    {
#if !USING_XR_SDK
		//For legacy, we should initialize OVRManager in all cases.
		//For now, in XR SDK, only initialize if OVRPlugin is initialized.
		InitOVRManager();
#elif UNITY_EDITOR
        InitOVRManager();
#else
        if (OVRPlugin.initialized)
            InitOVRManager();
#endif
    }

 N.B: By the way where is the Oculus Unity documentation page about the key bindings to move head (and use controllers) from the game view of the Unity editor? I was unable to find it.