docs.unity3d.com
    Show / Hide Table of Contents

    Class RTHandle

    Provides a utility class for safely managing the lifetime of a RenderTexture.

    Inheritance
    Object
    RTHandle
    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 RTHandle

    Properties

    Desc

    The descriptor for the RTHandle and RenderTexture.

    Declaration
    public RenderTextureDescriptor Desc { get; }
    Property Value
    Type Description
    RenderTextureDescriptor

    Name

    The name for the RTHandle and RenderTexture.

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    String

    RT

    The RenderTexture for this RTHandle.

    Declaration
    public RenderTexture RT { get; }
    Property Value
    Type Description
    RenderTexture

    Methods

    Scoped()

    Gets a new disposable RTHandle.RTHandleScope instance to use within using blocks.

    Declaration
    public RTHandle.RTHandleScope Scoped()
    Returns
    Type Description
    RTHandle.RTHandleScope

    Returns a new RTHandleScope instance.

    WithName(String)

    Sets the name of the RenderTexture, and returns a reference to this RTHandle.

    Declaration
    public RTHandle WithName(string name)
    Parameters
    Type Name Description
    String name

    The name of the underlying RenderTexture.

    Returns
    Type Description
    RTHandle

    Returns a reference to this RTHandle.

    Operators

    Implicit(RTHandle to RenderTexture)

    Converts the RTHandle to a RenderTexture type.

    Declaration
    public static implicit operator RenderTexture(RTHandle handle)
    Parameters
    Type Name Description
    RTHandle handle

    The RTHandle to convert.

    Returns
    Type Description
    RenderTexture

    Returns a RenderTexture handle.

    Implicit(RTHandle to Texture)

    Converts the RTHandle to a Texture type.

    Declaration
    public static implicit operator Texture(RTHandle handle)
    Parameters
    Type Name Description
    RTHandle handle

    The RTHandle to convert.

    Returns
    Type Description
    Texture

    Returns a RenderTexture handle.

    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