Method AllocRTWrapper
AllocRTWrapper(int, int, int, Action<RenderTexture>, bool)
Allocate a RenderTextureWrapper
Declaration
public RenderTextureWrapper AllocRTWrapper(int width, int height, int depthBits, Action<RenderTexture> onReCreated, bool releaseOnPause = true)
Parameters
| Type | Name | Description |
|---|---|---|
| int | width | Width for target RenderTexture |
| int | height | Height for target RenderTexture |
| int | depthBits | Depth bits for target RenderTexture |
| Action<RenderTexture> | onReCreated | Callback when target RenderTexture be re created. |
| bool | releaseOnPause | Should target RenderTexture be released automatically when application paused |
Returns
| Type | Description |
|---|---|
| RenderTextureWrapper |
Remarks
won't be triggered when RenderTexture first created.
AllocRTWrapper(RenderTexture, Action<RenderTexture>, bool)
Declaration
public RenderTextureWrapper AllocRTWrapper(RenderTexture rt, Action<RenderTexture> onReCreated, bool releaseOnPause = true)
Parameters
| Type | Name | Description |
|---|---|---|
| RenderTexture | rt | |
| Action<RenderTexture> | onReCreated | |
| bool | releaseOnPause |
Returns
| Type | Description |
|---|---|
| RenderTextureWrapper |