Hello,
With the old XR stack it was easy to start the game without VR by passing the vrmode None parameter. How does it works with the new XR stack? Do we have a special parameter? Or do I have to do it by myself in the code?
Thanks.
Hello,
With the old XR stack it was easy to start the game without VR by passing the vrmode None parameter. How does it works with the new XR stack? Do we have a special parameter? Or do I have to do it by myself in the code?
Thanks.
Thanks a lot!
But how can I choose a specific SDK without removing them from the list?
I don’t have enough headsets with me to check, but I believe:
Using the settings manager instance from the above docs:
var loaders = settingsManager.loaders;
// Add/Remove/Reorder loader list;
settingsManager.loaders = loaders;
i.e. modify the “loaders” list then re-assign it.
Although Unity’s docs are definitely wrong here - one page says that operation is required, the other page says it’s impossible/illegal (at the compiler level) .
The problem is that if you change the loader variable, it changes the scriptable object and its saved like that. That means next time the loaders variable only contains one loader. It’s the behaviour in the editor.
A hack could be to copy the loader list and put it with good values when OnDestroy or OnApplicationClose are called.
In player builds it should be fine, of course - which I guess is the only variant they tested?
The manual restore sucks but should work fine. We’ve had to do that for 10 years now with Unity Terrain (bad design decision up-front, they made some of the terrain config “an Asset”, and never finished writing their API/implementation, so everyone has to manually restore the Asset data when leaving play mode. 10 years!).
I do that for Scriptable Render pipeline modifications during runtime too Well looks like I’m good to save and restore the list content. It’s a steam game, I can’t take a risk…
Changing the order and using InitializeLoader doesn’t work well for me. I got a black screen in the editor, when I stop the editor it’s freezed
I would like a working example of how to start and stop manually the new XR stack because for what I tried, it doesn’t work.
I think @mfuad is one of the team working on this stuff - hopefully he can help.
(I’ve asked about this a few times, and haven’t got an answer from anyone at Unity on it, so I’d love to get an official response. Getting it to “not autostart” is OK, but as you’re finding, the rest is … just not really documented, as far as I can tell, and I know some people have got it to work, but it’s not obvious how)
Well it could be great because right now, I can’t use this system The OpenVR packages crashes my build too.
I’ll disable VR for first beta test, I hope Unity will answer the question
Anyone got any experience with the Cardboard Plugin? we’re having some issues - Initializing the loader will cause our magic window scene to not draw.
Looking at the code for XRManagerSettings the property setter for the List of loaders is guarded like:
#if UNITY_EDITOR
set { m_Loaders = value; }
#endif
which I think ultimately means there’s not going to be a way reorder those loaders at runtime if your not running in the editor (I don’t see any other api there that lets you manipulate that list).
I’m not really sure why that setter is guarded like that - if anything due to the serialization issue isn’t it more of a problem to be setting the loaders while in the editor?
I guess to manually handle XR plugin loading you pretty much have to copy the code out of XRManagerSettings into your own class where you can have a mutable list to work with instead.