Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unity Asset does not work for Unity 2017 #20

Open
TheSeanLavery opened this issue Aug 1, 2019 · 7 comments
Open

Unity Asset does not work for Unity 2017 #20

TheSeanLavery opened this issue Aug 1, 2019 · 7 comments

Comments

@TheSeanLavery
Copy link

I think the update to 2019 broke something.

@lux
Copy link
Contributor

lux commented Aug 2, 2019

The update relies on newer Unity APIs that were introduced in 2018, so projects will either have to stick with the previous version or upgrade Unity I'm afraid.

@OptrixAU
Copy link

OptrixAU commented Aug 6, 2019

We can't put in some conditional compile directives? I'm using the LTS version of 2018.4, and I can't use the package either. I LOVE the updates to XR devices in 2019, but I was hoping you could use conditional compile directives to maintain compatibility with the 2018.4 version, since we are unable to upgrade our major project at this time.

@lux
Copy link
Contributor

lux commented Aug 7, 2019

My mistake on updating to the 2019 XR devices APIs, I didn't realize they changed so much between 2018 and 2019 but it looks like the tracking capabilities require 2019...

Does it work if you stick with the previous release? The only real change was the 2019 updates.

@TheSeanLavery
Copy link
Author

2019 seems so new and untested. There are a lot of performance and UI bugs that might ruin project.

I'm staying away from 2019 until it can be proven more stable than 2017 and 2018 in a production environment.

It would be nice if the asset in the store had a 2017 version that worked.

@OptrixAU
Copy link

The performance of the Light-Weight Render Pipeline on VR in 2019 is very nice, and controller input is SO much better with the 2019 API. LWRP also appears to work around a BUNCH of problems you get on the Quest headset, like with post-processing effects and single-pass rendering on Android.

@lux
Copy link
Contributor

lux commented Aug 13, 2019

I'll see about putting together a 2018 branch soon. I understand we can't all jump to the latest version right away.

@OptrixAU
Copy link

OptrixAU commented Aug 13, 2019

The major issues seem to be mostly about controller input - you might be able to use preprocessor directives to have a single branch that supports both.

For example, in Assets/VRKeys/Scripts/Controller.cs, you could substitute functions like the ones below...

private bool DeviceIsValid () {
#if UNITY_2019_0_OR_NEWER
      return GetDevice ().isValid;
#else
      return GetDevice().IsValid;
#endif
}

and

public bool OnGrip () {
			if (!DeviceIsValid ()) return false;
                        bool value;
#if UNITY_2019_0_OR_NEWER                       
                        GetDevice ().TryGetFeatureValue (CommonUsages.gripButton, out value);
#else
                         value = Input.GetButtonDown("grip");
#endif
                         return value;
		}


Note that this would mean you would need to define "Grip" as a button in your input manager.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants