docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class XRGraphics

    XRGraphics insulates SRP from API changes across platforms, Editor versions, and as XR transitions into XR SDK

    Inheritance
    object
    XRGraphics
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Rendering
    Assembly: Unity.RenderPipelines.Core.Runtime.dll
    Syntax
    [Serializable]
    public class XRGraphics

    Properties

    enabled

    SRP should use this to safely determine whether XR is enabled at runtime.

    Declaration
    public static bool enabled { get; }
    Property Value
    Type Description
    bool

    eyeTextureDesc

    Eye texture descriptor.

    Declaration
    public static RenderTextureDescriptor eyeTextureDesc { get; }
    Property Value
    Type Description
    RenderTextureDescriptor

    eyeTextureHeight

    Eye texture height.

    Declaration
    public static int eyeTextureHeight { get; }
    Property Value
    Type Description
    int

    eyeTextureResolutionScale

    Eye texture resolution scale.

    Declaration
    public static float eyeTextureResolutionScale { get; set; }
    Property Value
    Type Description
    float

    eyeTextureWidth

    Eye texture width.

    Declaration
    public static int eyeTextureWidth { get; }
    Property Value
    Type Description
    int

    isDeviceActive

    Returns true if the XR device is active.

    Declaration
    public static bool isDeviceActive { get; }
    Property Value
    Type Description
    bool

    loadedDeviceName

    Name of the loaded XR device.

    Declaration
    public static string loadedDeviceName { get; }
    Property Value
    Type Description
    string

    renderViewportScale

    Render viewport scale.

    Declaration
    public static float renderViewportScale { get; }
    Property Value
    Type Description
    float

    stereoRenderingMode

    Stereo rendering mode.

    Declaration
    public static XRGraphics.StereoRenderingMode stereoRenderingMode { get; }
    Property Value
    Type Description
    XRGraphics.StereoRenderingMode

    supportedDevices

    List of supported XR devices.

    Declaration
    public static string[] supportedDevices { get; }
    Property Value
    Type Description
    string[]

    tryEnable

    Try enable.

    Declaration
    public static bool tryEnable { get; }
    Property Value
    Type Description
    bool

    Extension Methods

    ReflectionUtils.GetField(object, string)
    ReflectionUtils.GetFields(object)
    ReflectionUtils.Invoke(object, string, params object[])
    ReflectionUtils.SetField(object, string, object)
    AnalyticsUtils.ToNestedColumnWithDefault<T>(T, T, bool)
    AnalyticsUtils.ToNestedColumn<T>(T, bool)
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)