Version: 2020.2

Texture3DConstructor

切换到手册
public Texture3D (int width, int height, int depth, TextureFormat textureFormat, bool mipChain);

参数

width 纹理宽度(以像素为单位)。
height 纹理高度(以像素为单位)。
depth 纹理深度(以像素为单位)。
textureFormat 纹理数据格式。
mipChain 确定纹理是否具有 Mipmap。值为 1 (true) 表示纹理有 Mipmap,值为 0 (false) 表示纹理没有 Mipmap。

描述

创建一个新的空 3D 纹理。

3D 纹理可视为具有宽度、高度和深度的一盒像素。注意,大纹理会占用大量内存,例如 TextureFormat.ARGB32 格式、没有多级渐进纹理的 1024x512x256 纹理会占用 512MB 内存。

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

另请参阅:SetPixelSetPixelsSetPixels32Apply 函数。

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961