docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class UniversalRenderPipelineRuntimeXRResources

    A resource container for textures used for UniversalRenderPipeline.

    Inheritance
    object
    UniversalRenderPipelineRuntimeXRResources
    Implements
    IRenderPipelineResources
    IRenderPipelineGraphicsSettings
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Rendering.Universal
    Assembly: Unity.RenderPipelines.Universal.Runtime.dll
    Syntax
    [Serializable]
    [SupportedOnRenderPipeline(typeof(UniversalRenderPipelineAsset))]
    [CategoryInfo(Name = "R: Runtime XR", Order = 1000)]
    [HideInInspector]
    public class UniversalRenderPipelineRuntimeXRResources : IRenderPipelineResources, IRenderPipelineGraphicsSettings
    Remarks

    You cannot edit these resources through the editor's UI; use the API for advanced changes. Changing this through the API is only allowed in the Editor. In the Player, this raises an error.

    This container is removed for non-XR builds.

    Examples

    Here is an example of how to get the MotionVector shader used by URP for XR.

    using UnityEngine.Rendering;
    using UnityEngine.Rendering.Universal;
    

    public static class URPUniversalRendererRuntimeXRResourcesHelper { public static Shader motionVector { get { var gs = GraphicsSettings.GetRenderPipelineSettings<UniversalRenderPipelineRuntimeXRResources>(); if (gs == null) //not in URP or XR not enabled return null; return gs.xrMotionVector; } } }

    Properties

    version

    Current version of the resource container. Used only for upgrading a project.

    Declaration
    public int version { get; }
    Property Value
    Type Description
    int
    See Also
    IRenderPipelineResources

    xrMirrorViewPS

    XR Mirror View shader.

    Declaration
    public Shader xrMirrorViewPS { get; set; }
    Property Value
    Type Description
    Shader
    See Also
    IRenderPipelineResources

    xrMotionVector

    XR MotionVector shader.

    Declaration
    public Shader xrMotionVector { get; set; }
    Property Value
    Type Description
    Shader
    See Also
    IRenderPipelineResources

    xrOcclusionMeshPS

    XR Occlusion mesh shader.

    Declaration
    public Shader xrOcclusionMeshPS { get; set; }
    Property Value
    Type Description
    Shader
    See Also
    IRenderPipelineResources

    Implements

    IRenderPipelineResources
    IRenderPipelineGraphicsSettings

    See Also

    IRenderPipelineResources
    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)