RenderTextureGetter
A class in Root.Township, the global namespace.
Client: borrows a temporary render texture on request and hands it to a material and/or camera; releases it on clear or destroy.
- Listed in Global namespace: Q to R
- Inherits or implements
MonoBehaviour
Constructors
| Member | What it is |
|---|---|
RenderTextureGetter() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
5 private and internal fields
| Member | What it is |
|---|---|
private Camera cameraToRender | Optional camera whose target texture is set. |
private SerializedRenderTextureDescriptor descriptor | Settings for the texture to create. |
private int materialIndex | Shader property ID for materialKeyword. |
private string materialKeyword | Material texture property to set, _MainTex by default. |
private Material materialToSetTexture | Optional material that gets the texture. |
Properties
| Member | What it is |
|---|---|
RenderTexture RenderTexture { get; private set; } | The texture currently held, or null. |
Events
| Member | What it is |
|---|---|
event Action<RenderTexture> onRenderTextureUpdated | Fired with the new texture (or null) when it changes. |