/// <summary>
        /// Returns the type of device currently in use
        /// </summary>
        /// <returns>The device type</returns>
        public static DeviceType GetDeviceType(this IUsesDeviceType @this)
        {
            if (string.IsNullOrEmpty(s_XRDeviceModel))
                s_XRDeviceModel = XRDevice.model;

            return s_XRDeviceModel.IndexOf("oculus", StringComparison.OrdinalIgnoreCase) >= 0
                ? DeviceType.Oculus : DeviceType.Vive;
        }
示例#2
0
        /// <summary>
        /// Returns the type of device currently in use
        /// </summary>
        /// <returns>The device type</returns>
        public static DeviceType GetDeviceType(this IUsesDeviceType @this)
        {
#if UNITY_2020_2_OR_NEWER
            return(default);
示例#3
0
 /// <summary>
 /// Returns the type of device currently in use
 /// </summary>
 /// <returns>The device type</returns>
 public static DeviceType GetDeviceType(this IUsesDeviceType @this)
 {
     return(XRDevice.model.IndexOf("oculus", StringComparison.OrdinalIgnoreCase) >= 0
         ? DeviceType.Oculus : DeviceType.Vive);
 }