Skip to content

Changed VR.VRSettings to XR.XRSettings #71

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

Closed
wants to merge 2 commits into from

Conversation

Ahrdie
Copy link

@Ahrdie Ahrdie commented Mar 5, 2018

Fixing the warning dialogue and Unitys autofix for the Change from VR.VRSettings to XR.XRSettings.

@kisak-valve
Copy link
Member

When was this change in Unity? Can the adjustment be done without causing trouble for older Unity versions?

@bddckr
Copy link

bddckr commented Mar 5, 2018

This should work fine (we're doing this in VRTK):

#if UNITY_2017_2_OR_NEWER
    using UnityEngine.XR;
#else
    using XRSettings = UnityEngine.VR.VRSettings;
    using XRDevice = UnityEngine.VR.VRDevice;
#endif

Add this to the top of the file in the using section and then in the same file use XRSettings or XRDevice instead and it will work for all versions in this case (the used API is compatible).

@davegreco
Copy link

When can we expect some of these things to get merged in for a new version? There have been great changes in the past 6 months and people have been proactive about about providing solutions but it's getting to be a bit of a list. Who's in charge of this stuff, what are the plans for this system I'm hoping to see Valve continue to be the go to lightweight interchange for this open VR world but I'm a bit concerned that despite the efforts from the community here in order to use this in modern versions of Unity you're essentially having to branch and monkey batch a bunch of pending PRs, this shouldn't require much of someones time to maintain (though I understand time is always lacking).

@davegreco
Copy link

By the way, this is no longer a warning. Unless I'm missing some build setting to ignore it.

Error CS0619 'VRDevice' is obsolete: 'VRDevice has been moved and renamed. Use UnityEngine.XR.XRDevice instead (UnityUpgradable) -> UnityEngine.XR.XRDevice'

@bddckr
Copy link

bddckr commented Jun 13, 2018

@davegreco Unity should ask you to run the API Updater on the imported SteamVR asset when you do so. If you allow/confirm that it will fix these for you automatically. (At least the UnityUpgradable ones...)

zite added a commit that referenced this pull request Jun 21, 2018
Changes for v1.3b06:

* Added some flower and planting stuff for the tutorial

* Updating knuckles actions and binding jsons

* Added code solution for blending skeleton animations to mechanim, no example yet though

* Updated some helper components to utilize Unity Events properly

* Updated skeleton hierarchy


Changes for v1.3b05:

* Added a knuckles binding for the Grab mode

* Fixed some bugs around skeleton updates and GC alloc

* Fixed a pretty significant perf hit

* Added a blending option to skeletons

* Added some ui to try out skeleton options

* Added a target for the throwing examples

* Updated longbow to only fire arrows with the pinch action

* Updated other interactable examples

* Added some helper methods to hand around showing / hiding controller or the whole hand.

* Fixed some of the throwing examples


Changes for v1.3b04:

* Added some more extensive velocity and angular velocity estimation based on positions and rotations per frame. Normalizing for time between frames.

* Cleaned out and updated the actions + bindings for knuckles/wands/touch.

* Fixed a bug with newly created actions not having a set type

* Updated extra scenes to use the new input system


Changes for v1.3b03:

* Fixed some warnings for unity 2017 / 2018.

* Fixed some editor UI issues for 2018

* Fixed issues with Unity 2017+ not wanting to open scenes from a script reloaded callback


Changes for v1.3b02:

* Added DefaultInputAction attribute to automatically assign actions during action generation.

* Updated default CameraRig prefab to use the new input system and components


Changes for v1.3b01:

* Integrated SteamVR Input System.
https://steamcommunity.com/games/250820/announcements/detail/3809361199426010680

* [InteractionSystem] Added basic examples of the Skeletal API

* [InteractionSystem] Integrated SteamVR Input System. Actions and Action Sets instead of buttons.

* [InteractionSystem] Added Velocity style object interaction

* [InteractionSystem] Fixed some issues from github. Took some pull requests.
#79
#73
#72
#71
#67
#64
#84
#78
@zite
Copy link
Collaborator

zite commented Oct 2, 2018

Thanks Bddckr. Added this in version 2.0.

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

Successfully merging this pull request may close these issues.

5 participants