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
    Object
    ScriptableObject
    ScriptableRendererFeature
    KeepFrameFeature
    RenderObjects
    Inherited Members
    ScriptableObject.CreateInstance(String)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(Object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, Boolean)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, Boolean)
    Object.DontDestroyOnLoad(Object)
    Object.FindObjectsOfType<T>()
    UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
    Object.FindObjectOfType<T>()
    UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
    Object.FindObjectOfType(Type)
    Object.FindObjectOfType(Type, Boolean)
    Object.ToString()
    Object.name
    Object.hideFlags
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.Rendering.Universal
    Syntax
    [ExcludeFromPreset]
    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

    Renderer used for adding render passes.

    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()
    Implements
    IDisposable.Dispose()

    Dispose(Boolean)

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

    OnCameraPreCull(ScriptableRenderer, CameraData)

    Callback before cull happens in renderer.

    Declaration
    public virtual void OnCameraPreCull(ScriptableRenderer renderer, in CameraData cameraData)
    Parameters
    Type Name Description
    ScriptableRenderer renderer

    Renderer of callback.

    CameraData cameraData

    CameraData contains all relevant render target information for the camera.

    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
    In This Article
    • Properties
      • isActive
    • Methods
      • AddRenderPasses(ScriptableRenderer, ref RenderingData)
      • Create()
      • Dispose()
      • Dispose(Boolean)
      • OnCameraPreCull(ScriptableRenderer, CameraData)
      • SetActive(Boolean)
    • See Also
    Back to top
    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