cancel
Showing results for 
Search instead for 
Did you mean: 

OVRHeadsetEmulator doesn't move the view in the Game panel

learnwithus
Honored Guest
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.
26 REPLIES 26

hrrsn
Honored Guest
This doesnt seem to be working so simply any more. @filipefmiranda - Dont suppose you know of a new fix?

hrrsn
Honored Guest
This doesnt seem to be working so simply any more. @filipefmiranda - Dont suppose you know of a new fix?

robshox
Honored Guest
Is there an alternative emulator that can be used with XR Toolkit?

frenchjam
Honored Guest
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.

eruperu
Honored Guest


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

muhr2
Explorer


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

dev_cm
Explorer

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 🙂

Moopaloo
Explorer
Checking oculus for the desktop XR plugin worked for me too. Thanks @frenchjam

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

steffeystudios
Honored Guest

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