Version: 2021.3

Texture2DArrayConstructor

切换到手册
public Texture2DArray (int width, int height, int depth, TextureFormat textureFormat, bool mipChain, bool linear= false);
public Texture2DArray (int width, int height, int depth, TextureFormat textureFormat, int mipCount, bool linear);

参数

width 纹理数组的宽度(以像素为单位)。
height 纹理数组的高度(以像素为单位)。
depth 纹理数组元素的数量。
linear 纹理是否包含非颜色数据(即,采样时不进行任何颜色空间转换)?默认为 false。
textureFormat 纹理的格式。
mipChain 是否应该创建多级渐进纹理?
mipCount Amount of mips to allocate for the texture array.

描述

创建一个新的纹理数组。

创建纹理后,通常需要设置其颜色。 使用 SetPixels、SetPixels32 或 Graphics.CopyTexture 函数可进行此设置。

Note that this class does not support Texture2DArray creation with a Crunch compression TextureFormat.