Format
typescript
RenderTexture.depthStencilFormatclass: RenderTexture
Description
(Read Only) The format of the depth and stencil buffer.
This method returns an enumeration type, for more details see GraphicsFormat.
Parameters
| param_name | type | description |
|---|
Return
| type | description |
|---|---|
GraphicsFormat | GraphicsFormat enumeration value |
Code Example
typescript
function Test() {
try {
let temp_texture = RenderTexture.GetTemporary(100, 100, RenderTextureFormat.Default, DepthType.Depth24Stencil8, AntiAliasingLevel.x8);
// Get the format of the depth/stencil buffer
let depthStencilFormat = temp_texture.getDepthStencilFormat();
} catch (error) {
Debug.Log(error);
}
}