docs.unity3d.com
    Show / Hide Table of Contents

    Class RTHandleCollection

    Provides a collection class for mapping string and integer values to RTHandles.

    Inheritance
    Object
    RTHandleCollection
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEditor.TerrainTools
    Syntax
    public class RTHandleCollection : IDisposable

    Constructors

    RTHandleCollection()

    Initializes and returns an instance of RTHandleCollection.

    Declaration
    public RTHandleCollection()

    Properties

    Item[Int32]

    Access an RTHandle using an int hash.

    Declaration
    public RTHandle this[int hash] { get; set; }
    Parameters
    Type Name Description
    Int32 hash
    Property Value
    Type Description
    RTHandle

    Item[String]

    Access an RTHandle using a string.

    Declaration
    public RTHandle this[string name] { get; set; }
    Parameters
    Type Name Description
    String name
    Property Value
    Type Description
    RTHandle

    Methods

    AddRTHandle(Int32, String, GraphicsFormat)

    Adds an RTHandle description to the RTHandleCollection for later use when you call GatherRTHandles(Int32, Int32, Int32).

    Declaration
    public void AddRTHandle(int hash, string name, GraphicsFormat format)
    Parameters
    Type Name Description
    Int32 hash

    The hash or integer value used to identify the RTHandle.

    String name

    The name used to identify the RTHandle.

    GraphicsFormat format

    The GraphicsFormat to use for the RTHandle description.

    ContainsRTHandle(String)

    Checks to see if an RTHandle with the provided name already exists.

    Declaration
    public bool ContainsRTHandle(string name)
    Parameters
    Type Name Description
    String name

    The name used to identify an RTHandle in this RTHandleCollection.

    Returns
    Type Description
    Boolean

    Returns true if the RTHandle exists.

    Dispose()

    Calls the overridden Dispose(Boolean) method.

    Declaration
    public void Dispose()
    Implements
    IDisposable.Dispose()

    Dispose(Boolean)

    Releases the gathered RTHandle resources, and clears the RTHandleCollection Dictionary.

    Declaration
    public virtual void Dispose(bool dispose)
    Parameters
    Type Name Description
    Boolean dispose

    Whether to dispose resources when clearing releasing the RTHandleCollection. When the value is true, Unity disposes of resources. Otherwise, Unity does not dispose of resources.

    Remarks

    Override this method if you create a class that derives from RTHandleCollection.

    See Also
    ReleaseRTHandles()

    GatherRTHandles(Int32, Int32, Int32)

    Gathers all added RTHandles using the width, height, and depth values, if provided.

    Declaration
    public void GatherRTHandles(int width, int height, int depth = 0)
    Parameters
    Type Name Description
    Int32 width

    The width of the RTHandle to gather.

    Int32 height

    The height of the RTHandle to gather.

    Int32 depth

    The optional depth of the RTHandle to gather.

    GetRTHandle(Int32)

    Checks to see if an RTHandle with the provided hash value already exists.

    Declaration
    public RTHandle GetRTHandle(int hash)
    Parameters
    Type Name Description
    Int32 hash

    The hash or integer value used to identify an RTHandle in this RTHandleCollection.

    Returns
    Type Description
    RTHandle

    Returns the RTHandle reference associated with the provided hash or integer value. Returns NULL if the key isn't found.

    OnSceneGUI(Single)

    Renders a debug GUI in the SceneView that displays all the RTHandles in this RTHandleCollection.

    Declaration
    public void OnSceneGUI(float size)
    Parameters
    Type Name Description
    Single size

    The size used to draw the Textures.

    ReleaseRTHandles()

    Releases the gathered RTHandle resources.

    Declaration
    public void ReleaseRTHandles()
    Back to top
    Copyright © 2023 Unity Technologies
    • 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 Friday, November 3, 2023