Class RTHandleCollection
Collection class for mapping string and integer values to RTHandles
Namespace: UnityEditor.Experimental.TerrainAPI
Syntax
public class RTHandleCollection : IDisposable
Constructors
RTHandleCollection()
RTHandleCollection constructor
Declaration
public RTHandleCollection()
Properties
Item[Int32]
Access a RTHandle using an integer hash
Declaration
public RTHandle this[int hash] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
Int32 | hash |
Property Value
Type | Description |
---|---|
RTHandle |
Item[String]
Access a RTHandle using a string value
Declaration
public RTHandle this[string name] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
String | name |
Property Value
Type | Description |
---|---|
RTHandle |
Methods
AddRTHandle(Int32, String, GraphicsFormat)
Add a RTHandle description to the RTHandleCollection for later use when calling GatherRTHandles The hash or integer value used to identify the RTHandle The name used to identify the RTHandle The GraphicsFormat to use for the RTHandle description
Declaration
public void AddRTHandle(int hash, string name, GraphicsFormat format)
Parameters
Type | Name | Description |
---|---|---|
Int32 | hash | |
String | name | |
GraphicsFormat | format |
ContainsRTHandle(String)
Check to see if a RTHandle with the provided name exists already The name used to identify a RTHandle in this RTHandleCollection
Declaration
public bool ContainsRTHandle(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name |
Returns
Type | Description |
---|---|
Boolean |
Dispose()
Dispose method for this class
Declaration
public void Dispose()
Dispose(Boolean)
Overridable Dispose method for this class. Override this if you create a class that derives from RTHandleCollection Whether or not resources should be disposed
Declaration
public virtual void Dispose(bool dispose)
Parameters
Type | Name | Description |
---|---|---|
Boolean | dispose |
GatherRTHandles(Int32, Int32, Int32)
Gather/Create all added RTHandles using the provided width, height, and depth value, if provided
The width of the RTHandles to gather
The height of the RTHandles to gather
The optional depth of the RTHandles to gather
Declaration
public void GatherRTHandles(int width, int height, int depth = 0)
Parameters
Type | Name | Description |
---|---|---|
Int32 | width | |
Int32 | height | |
Int32 | depth |
GetRTHandle(Int32)
Check to see if a RTHandle with the provided hash value exists already
The hash or integer value used to identify a RTHandle in this RTHandleCollection
Declaration
public RTHandle GetRTHandle(int hash)
Parameters
Type | Name | Description |
---|---|---|
Int32 | hash |
Returns
Type | Description |
---|---|
RTHandle |
OnSceneGUI(Single)
Render debug GUI in the SceneView that displays all the RTHandles in this RTHandleCollection The size that is used to draw the textures
Declaration
public void OnSceneGUI(float size)
Parameters
Type | Name | Description |
---|---|---|
Single | size |
ReleaseRTHandles()
Release the RTHandle resources that have been gathered
Declaration
public void ReleaseRTHandles()