Skip to content

Instantly share code, notes, and snippets.

@codingstyle
Created September 13, 2017 07:06
Show Gist options
  • Save codingstyle/9ccb8ccb739c8856442b27d4075b27a7 to your computer and use it in GitHub Desktop.
Save codingstyle/9ccb8ccb739c8856442b27d4075b27a7 to your computer and use it in GitHub Desktop.
Migration helper from VR to XR namespace in Unity 2017.2
//
// See : https://docs.google.com/document/d/1PCqlBTPToO908mkeOTRGFlFk1HXY_N1zYsNJtaZdUQA/preview
//
#if UNITY_2017_2
using UnityEngine.XR;
#else
using UnityEngine.VR;
using XRDevice = UnityEngine.VR.VRDevice;
using XRStats = UnityEngine.VR.VRStats;
using XRSettings = UnityEngine.VR.VRSettings;
using XRNode = UnityEngine.VR.VRNode;
using XRNodeState = UnityEngine.VR.VRNodeState;
#endif
@codingstyle
Copy link
Author

codingstyle commented Sep 13, 2017

A quick helper to add the new XR* types forUnity 5.x and Unity 2017.1, and help the future transition to Unity 2017.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment