|
|
|
|
|
|
public float occlusionMaskScale; |
|
|
|
public bool showDeviceView; |
|
|
|
public GameViewRenderMode gameViewRenderMode; |
|
|
|
|
|
|
|
|
|
|
|
public void SetConfig() |
|
|
|
{ // If XR is enabled, sets XRSettings from our saved config
|
|
|
|
if (!enabled) |
|
|
|
|
|
|
return false; |
|
|
|
#endif
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
public static StereoRenderingPath stereoRenderingMode |
|
|
|
{ |
|
|
|
get |
|
|
|
{ |
|
|
|
if (!enabled) |
|
|
|
Assert.IsFalse(enabled); |
|
|
|
#if UNITY_2018_3_OR_NEWER
|
|
|
|
return (StereoRenderingPath)XRSettings.stereoRenderingMode; |
|
|
|
#else
|
|
|
|
if (eyeTextureDesc.vrUsage == VRTextureUsage.TwoEyes) |
|
|
|
return StereoRenderingPath.SinglePass; |
|
|
|
else if (eyeTextureDesc.dimension == UnityEngine.Rendering.TextureDimension.Tex2DArray) |
|
|
|
return StereoRenderingPath.Instancing; |
|
|
|
else |
|
|
|
return StereoRenderingPath.MultiPass; |
|
|
|
#endif
|
|
|
|
} |
|
|
|
} |
|
|
|
public static RenderTextureDescriptor eyeTextureDesc |
|
|
|
{ |
|
|
|
get |
|
|
|
|
|
|
if (!enabled) |
|
|
|
Assert.IsFalse(enabled); |
|
|
|
return XRSettings.eyeTextureHeight; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public static string[] supportedDevices |
|
|
|
{ |
|
|
|
get |
|
|
|
{ |
|
|
|
if (!enabled) |
|
|
|
Assert.IsFalse(enabled); |
|
|
|
return XRSettings.supportedDevices; |
|
|
|
} |
|
|
|
} |
|
|
|
} |