cancel
Showing results for 
Search instead for 
Did you mean: 

Disabling Oculus Initialization for Windows Standalone, but keep it for Quest

Anonymous
Not applicable
I am making a networked app where the server is hosted on a PC (windows standalone). 
When I launch the server as headless, its giving me a readout of [XR] Error determining if we should quit: Not Initialized,
This is after it cant load the Spatializer etc. Details in log.txt. 

I want to be able to turn of Oculus functionality for this platform, but continue using it on the Quest. 

I have deleted the Windows oculus plugins located at Oculus->VR->Plugins->1.51.0
I have unchecked the "Initialize XR on Startup" in XR Plug-In Management
I have tried XRSettings.enabled = false, and XRDisplaySubsystem.Stop. 

Any help appreciated
1 REPLY 1

DragonForged
Explorer
This is the script I use to select which camera I'm using for my splash screen based on whether or not a VR device is connected.  Maybe you can tweak it for your purposes.  You just attach it to an empty game object.




using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class DisplaySwitcher : MonoBehaviour
{
[SerializeField]
GameObject _flatCamera;

[SerializeField]
GameObject _VRCamera;

void Awake()
{
bool isPresent = VRUtils.isPresent();
_flatCamera.SetActive(!isPresent);
_VRCamera.SetActive(isPresent);
}
}