Format
typescript
RenderTexture.renderTextureFormatclass: RenderTexture
Description
(Read Only) The format of the render texture.
This method returns an enumeration type. For more details, please refer to RenderTextureFormat.
Parameters
| param_name | type | description |
|---|
Return
| type | description |
|---|---|
RenderTextureFormat | The enumeration value of RenderTextureFormat. |
Code Example
typescript
function Test() {
try {
let temp_texture = RenderTexture.GetTemporary(100, 100, RenderTextureFormat.Default, DepthType.Depth24Stencil8, AntiAliasingLevel.x8);
// Get the format of the render texture
let renderTextureFormat = temp_texture.getRenderTextureFormat();
} catch (error) {
Debug.Log(error);
}
}