Forum Discussion
learnwithus
7 years agoHonored Guest
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.
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
Replies have been turned off for this discussion
- Jun_SimamDigitalMHCP Member
It still does not work in 2024 editing the OVRManager script enabled me to move the camera but what about input and hand interaction simulation? I tried the Meta XR Simulator event, but that didn't work either.
- khelkunExplorer
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.
- VR-TuberHonored Guest
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 - steffeystudiosHonored Guest
What a weird specific bug to still exist 3 years later. Thanks for the help, y'all!
- Frenoir45Honored Guest
still there in 2023 as well
- MoopalooExplorerChecking oculus for the desktop XR plugin worked for me too. Thanks @frenchjam
- dev_cmExplorer
muhr2 said:
filipefmiranda said:
OVRManager.csSeems 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.5File: 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 fineif (!OVRPlugin.initialized)InitOVRManager();#endif}
...
Thanks @filipefmiranda and the others for the intitial hint :)- Frenoir45Honored Guest
and they still have yet to fix this in 2023
- simcrewdevHonored Guest
This bug is there for a long time! Why doesn't Oculus fix this?!?
- muhr2Explorer
filipefmiranda said:
OVRManager.csSeems 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 - eruperuHonored Guest
filipefmiranda said:
OVRManager.csSeems 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 - frenchjamHonored GuestI 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.
- robshoxHonored GuestIs there an alternative emulator that can be used with XR Toolkit?
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 3 years ago