XRTK / com.xrtk.core

The Official Mixed Reality Framework for Unity
https://xrtk.io
MIT License
309 stars 34 forks source link

Road to Unity 2020.X #716

Closed FejZa closed 3 years ago

FejZa commented 3 years ago

XRTK - Mixed Reality Toolkit

Analyzing which parts of the toolkit are currently relevant to Unity 2020.X support. Here's the first batch of errors I get when opening an XRTK project in 2020.2:

Library\PackageCache\com.xrtk.core@0.2.0-preview.111\Runtime\Providers\CameraSystem\BaseCameraDataProvider.cs(90,60): error CS0619: 'XRDevice.isPresent' is obsolete: 'This is obsolete, and should no longer be used. Instead, find the active XRDisplaySubsystem and check that the running property is true (for details, see XRDevice.isPresent documentation).'

Lots of errors in XRTK-WMR due to missing WMR legacy package

StephenHodgson commented 3 years ago

Yeah I'm worried about what the future holds if we're forced to have to use the xr subsystems. I really don't want anything to do with them. At the very least we'll need a shim and make a XRTK have it's own XR Subsystems that just forward info.

I have a feeling Unity may get rid of the XR Subsystems entirely once they adopt open xr.

StephenHodgson commented 3 years ago

WebXR with unity's xr subsystems is impossible atm bc of the way the xr apis are implemented.

FejZa commented 3 years ago

@StephenHodgson here's what I've been thinking.

What if there is a way for us to support both? A.) Native all the way B.) XR SDK Manager

B.) Opens up a way to support 2020.X in short term

Essentially the ONLY thing we need XR SDK Manager is to put the editor in "XR Enabled" mode. Nothing else. We can still use our own plugins/dlls etc. So essentially the path could be:

  1. On XRTK import check whether we are above or below 2020.X -> If we are at least in 2020.1 then check for XR SDK Management package, if not available offer to install it -> If 2019.4 or below, nothing changes for us

  2. Enable XR using the SDK package and keep everything else the way it is

StephenHodgson commented 3 years ago

Well I don't wanna do both, bc then it's more work, and duplicating features is never fun, nor rewarding.

Essentially the ONLY thing we need XR SDK Manager is to put the editor in "XR Enabled" mode. Nothing else. We can still use our own plugins/dlls etc.

This is essentially what I've been thinking but I have a feeling that people taking on the xrtk might want us to forward the data back to the xr subsystems, which I'm not really open to, just bc they're more likely to try to access the data from there instead of the services directly as intended.

If we do end up having to implement some basic boilerplate XR subsystems to get XR working it'd likely be the XR Subsystem Display and that is it.

I've already implemented XR Subsystems for other hardware venders in the past year so I know the basics of what needs to happen there.

StephenHodgson commented 3 years ago

Essentially the XRTK will be a plugin option in the XR SDK Manager preferences, which I don't like, but atm we have no other option.