RenderTexture.create

Create the render-texture.

Before calling this function, the render-texture is in an invalid state, thus it is mandatory to call it before doing anything with the render-texture.

The last parameter, depthBuffer, is useful if you want to use the render-texture for 3D OpenGL rendering that requires a depth-buffer. Otherwise it is unnecessary, and you should leave this parameter to false (which is its default value).

class RenderTexture
void
create
(
uint width
,
uint height
,
bool depthBuffer = false
)

Parameters

width
Type: uint

Width of the render-texture

height
Type: uint

Height of the render-texture

depthBuffer
Type: bool

Do you want this render-texture to have a depth buffer?

Meta