Skip to content

格式

typescript
RenderTexture.renderTextureFormat

所属类: RenderTexture

描述

(只读)渲染纹理格式。

该方法返回一个枚举类型,详细介绍见RenderTextureFormat

参数

参数名类型描述

返回值

类型描述
RenderTextureFormatRenderTextureFormat枚举值

代码示例

typescript
function Test() {
    try {
        let temp_texture = RenderTexture.GetTemporary(100, 100, RenderTextureFormat.Default, DepthType.Depth24Stencil8, AntiAliasingLevel.x8);
        // 获取渲染纹理格式
        let renderTextureFormat = temp_texture.getRenderTextureFormat();
    } catch (error) {
        Debug.Log(error);
    }
}