docs.unity3d.com
    Show / Hide Table of Contents

    Class ScriptableRendererFeature

    You can add a ScriptableRendererFeature to the ScriptableRenderer. Use this scriptable renderer feature to inject render passes into the renderer.

    Inheritance
    Object
    ScriptableRendererFeature
    RenderObjects
    Namespace: UnityEngine.Rendering.Universal
    Syntax
    public abstract class ScriptableRendererFeature : ScriptableObject, IDisposable

    Properties

    isActive

    Returns the state of the ScriptableRenderFeature (true: the feature is active, false: the feature is inactive). Use the method ScriptableRenderFeature.SetActive to change the value of this variable.

    Declaration
    public bool isActive { get; }
    Property Value
    Type Description
    Boolean

    Methods

    AddRenderPasses(ScriptableRenderer, ref RenderingData)

    Injects one or multiple ScriptableRenderPass in the renderer.

    Declaration
    public abstract void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData)
    Parameters
    Type Name Description
    ScriptableRenderer renderer
    RenderingData renderingData

    Rendering state. Use this to setup render passes.

    Create()

    Initializes this feature's resources. This is called every time serialization happens.

    Declaration
    public abstract void Create()

    Dispose()

    Disposable pattern implementation.

    Declaration
    public void Dispose()

    Dispose(Boolean)

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    Boolean disposing

    SetActive(Boolean)

    Sets the state of ScriptableRenderFeature (true: the feature is active, false: the feature is inactive). If the feature is active, it is added to the renderer it is attached to, otherwise the feature is skipped while rendering.

    Declaration
    public void SetActive(bool active)
    Parameters
    Type Name Description
    Boolean active

    The true value activates the ScriptableRenderFeature and the false value deactivates it.

    See Also

    ScriptableRenderer
    ScriptableRenderPass
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023