docs.unity3d.com
    目次を表示する/隠す

    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 : object

    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.

    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)