|
|
|
|
|
|
{ |
|
|
|
[Serializable] |
|
|
|
public struct XRGConfig |
|
|
|
{ // XRGConfig stores the desired XR settings for a given SRP asset.
|
|
|
|
{ // XRGConfig stores the desired XR settings for a given SRP asset.
|
|
|
|
|
|
|
|
public float renderScale; |
|
|
|
public float viewportScale; |
|
|
|
public bool useOcclusionMesh; |
|
|
|
public float occlusionMaskScale; |
|
|
|
public bool showDeviceView; |
|
|
|
public GameViewRenderMode gameViewRenderMode; |
|
|
|
|
|
|
|
public void SetConfig() |
|
|
|
{ // If XR is enabled, sets XRSettings from our saved config
|
|
|
|
if (!Enabled) |
|
|
|
|
|
|
XRSettings.gameViewRenderMode = gameViewRenderMode; |
|
|
|
} |
|
|
|
public void SetViewportScale(float viewportScale) |
|
|
|
{ // If XR is enabled, sets XRSettings from our saved config
|
|
|
|
{ // Only sets viewport- since this is probably the only thing getting updated every frame
|
|
|
|
|
|
|
|
public float renderScale; |
|
|
|
public float viewportScale; |
|
|
|
public bool useOcclusionMesh; |
|
|
|
public float occlusionMaskScale; |
|
|
|
public bool showDeviceView; |
|
|
|
public GameViewRenderMode gameViewRenderMode; |
|
|
|
|
|
|
|
public static readonly XRGConfig defaultXRConfig = new XRGConfig |
|
|
|
{ |
|
|
|