Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Commit adee757

Browse files
committed
Added a XR shim for XboxOne
1 parent 76c0a8f commit adee757

2 files changed

Lines changed: 42 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Small shim for VRSettings/XRSettings on XBOX
2+
#if UNITY_XBOXONE
3+
using System;
4+
5+
namespace UnityEngine.XR
6+
{
7+
#if UNITY_2017_2_OR_NEWER
8+
public static class XRSettings
9+
#elif UNITY_5_6_OR_NEWER
10+
public static class VRSettings
11+
#endif
12+
{
13+
public static bool enabled { get; set; }
14+
public static bool isDeviceActive { get; private set; }
15+
public static bool showDeviceView { get; set; }
16+
[Obsolete("renderScale is deprecated, use XRSettings.eyeTextureResolutionScale instead (UnityUpgradable) -> eyeTextureResolutionScale")]
17+
public static float renderScale { get; set; }
18+
public static float eyeTextureResolutionScale { get; set; }
19+
public static int eyeTextureWidth { get; private set; }
20+
public static int eyeTextureHeight { get; private set; }
21+
public static RenderTextureDescriptor eyeTextureDesc { get; private set; }
22+
public static float renderViewportScale { get; set; }
23+
public static float occlusionMaskScale { get; set; }
24+
public static bool useOcclusionMesh { get; set; }
25+
public static string loadedDeviceName { get; private set; }
26+
public static string[] supportedDevices { get; private set; }
27+
public static void LoadDeviceByName(string deviceName) { }
28+
public static void LoadDeviceByName(string[] prioritizedDeviceNameList) { }
29+
}
30+
}
31+
#endif

PostProcessing/Runtime/Utils/XRSettings.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)