docs.unity3d.com
    Show / Hide Table of Contents

    Class RenderGraphObjectPool

    Helper class provided in the RenderGraphContext to all Render Passes. It allows you to do temporary allocations of various objects during a Render Pass.

    Inheritance
    Object
    RenderGraphObjectPool
    Namespace: UnityEngine.Experimental.Rendering.RenderGraphModule
    Syntax
    public sealed class RenderGraphObjectPool

    Methods

    GetTempArray<T>(Int32)

    Allocate a temporary typed array of a specific size. Unity releases the array at the end of the Render Pass.

    Declaration
    public T[] GetTempArray<T>(int size)
    Parameters
    Type Name Description
    Int32 size

    Number of element in the array.

    Returns
    Type Description
    T[]

    A new array of type T with size number of elements.

    Type Parameters
    Name Description
    T

    Type of the array to be allocated.

    GetTempMaterialPropertyBlock()

    Allocate a temporary MaterialPropertyBlock for the Render Pass.

    Declaration
    public MaterialPropertyBlock GetTempMaterialPropertyBlock()
    Returns
    Type Description
    MaterialPropertyBlock

    A new clean MaterialPropertyBlock.

    Extension Methods

    ReflectionUtils.Invoke(Object, String, Object[])
    ReflectionUtils.SetField(Object, String, Object)
    ReflectionUtils.GetField(Object, String)
    ReflectionUtils.GetFields(Object)
    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