Class RTHandle
Provides a utility class for safely managing the lifetime of a Render
Inherited Members
Namespace: UnityEditor .TerrainTools
Assembly: Unity.TerrainTools.Editor.dll
Syntax
public class RTHandle
Properties
Desc
The descriptor for the RTHandle and RenderTexture.
Declaration
public RenderTextureDescriptor Desc { get; }
Property Value
Type | Description |
---|---|
Render |
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 |
---|---|
Render |
Methods
Scoped()
Gets a new disposable RTHandle.using
blocks.
Declaration
public RTHandle.RTHandleScope Scoped()
Returns
Type | Description |
---|---|
RTHandle.RTHandle |
Returns a new RTHandleScope instance. |
WithName(string)
Sets the name of the Render
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 operator RenderTexture(RTHandle)
Converts the RTHandle to a Render
Declaration
public static implicit operator RenderTexture(RTHandle handle)
Parameters
Type | Name | Description |
---|---|---|
RTHandle | handle | The RTHandle to convert. |
Returns
Type | Description |
---|---|
Render |
Returns a RenderTexture handle. |
implicit operator Texture(RTHandle)
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. |