Class RTHandleCollection
Provides a collection class for mapping string and integer values to RTHandles.
Implements
Inherited Members
Namespace: UnityEditor .TerrainTools
Assembly: Unity.TerrainTools.Editor.dll
Syntax
public class RTHandleCollection : IDisposable
Constructors
RTHandleCollection()
Initializes and returns an instance of RTHandleCollection.
Declaration
public RTHandleCollection()
Properties
this[int]
Access an RTHandle using an int
hash.
Declaration
public RTHandle this[int hash] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
int | hash |
Property Value
Type | Description |
---|---|
RTHandle |
this[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(int, string, GraphicsFormat)
Adds an RTHandle description to the RTHandleCollection for later use when you call Gather
Declaration
public void AddRTHandle(int hash, string name, GraphicsFormat format)
Parameters
Type | Name | Description |
---|---|---|
int | hash | The hash or integer value used to identify the RTHandle. |
string | name | The name used to identify the RTHandle. |
Graphics |
format | The Graphics |
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 |
---|---|
bool | Returns |
Dispose()
Calls the overridden Dispose(bool) method.
Declaration
public void Dispose()
Dispose(bool)
Releases the gathered RTHandle resources, and clears the RTHandleCollection Dictionary
.
Declaration
public virtual void Dispose(bool dispose)
Parameters
Type | Name | Description |
---|---|---|
bool | dispose | Whether to dispose resources when clearing releasing the RTHandleCollection.
When the value is |
Remarks
Override this method if you create a class that derives from RTHandleCollection.
See Also
GatherRTHandles(int, int, int)
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 |
---|---|---|
int | width | The width of the RTHandle to gather. |
int | height | The height of the RTHandle to gather. |
int | depth | The optional depth of the RTHandle to gather. |
GetRTHandle(int)
Checks to see if an RTHandle with the provided hash value already exists.
Declaration
public RTHandle GetRTHandle(int hash)
Parameters
Type | Name | Description |
---|---|---|
int | 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 |
OnSceneGUI(float)
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 |
---|---|---|
float | size | The size used to draw the Textures. |
ReleaseRTHandles()
Releases the gathered RTHandle resources.
Declaration
public void ReleaseRTHandles()