Method CreateOrResizeRenderTexture
CreateOrResizeRenderTexture(ref RenderTexture, int, int, int, bool, RenderTextureFormat, RenderTextureReadWrite, string)
Creates a new texture if the given texture is null or the wrong size.
Declaration
public static void CreateOrResizeRenderTexture(ref RenderTexture texture, int width, int height, int depth, bool enableReadWrite, RenderTextureFormat format, RenderTextureReadWrite colorSpace, string name = "")
Parameters
Type | Name | Description |
---|---|---|
RenderTexture | texture | Reference to the texture. |
int | width | Requested width. |
int | height | Requested height |
int | depth | Requested depth. |
bool | enableReadWrite | Enable random read writes on this texture. |
RenderTextureFormat | format | Format of the texture. |
RenderTextureReadWrite | colorSpace | Color space used for the texture. |
string | name | Optional name for the texture. Default: "". |