格式
typescript
RenderTexture.Apply(mipLevel)所属类: RenderTexture
描述
应用纹理。
参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| mipLevel | number? |
返回值
| 类型 | 描述 |
|---|---|
void |
代码示例
typescript
function Test() {
try {
let temp_texture = RenderTexture.GetTemporary(100, 100, RenderTextureFormat.Default, DepthType.Depth24Stencil8, AntiAliasingLevel.x8);
// 设置坐标 (10, 20) 处的像素颜色
temp_texture.setPixel(10,20,Color.new(1,1,1,1));
temp_texture.Apply();
} catch (error) {
Debug.Log(error);
}
}