/// <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; }
/// <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);
/// <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); }