Texture2D.Resize 调整大小


function Resize (width : int, height : int, format : TextureFormat, hasMipMap : bool) : bool

Description描述

Resizes the texture.

调整纹理大小

Changes size of texture to width by height, format to textureFormat and   optionally creates mip maps. After resizing, texture pixels will be undefined.   This function is very similar to the texture constructor, except it works on   existing texture object.

更改纹理的宽度和高度,格式为textureFormat并有选择的创建mipmaps。更改后,纹理像素是未定义的,此函数是非常相似纹理构造函数,只是它工作在现有纹理对象上。

Call Apply to actually upload   the changed pixels to the graphics card.

调用 Apply 函数来更新改编后的像素数据到显卡上

The texture has to have   Is Readable flag set in the import settings.

这个纹理需要导入设置为Is   Readable(可读)

• function Resize (width : int, height : int) : bool

Description描述

Resizes the texture.

调整纹理大小

Changes size of texture to width by height. After resizing, texture pixels will be undefined. This function is   very similar to texture constructor, except it works on existing texture   object.

更改纹理大小为宽度乘高度,更改后,纹理像素是未定义的,此函数是非常相似纹理构造函数,只是它工作在现有纹理对象上。

Call Apply to actually upload   the changed pixels to the graphics card.

调用 Apply 函数来更新改编后的像素数据到显卡上

The texture has to have   Is Readable flag set in the import settings.

这个纹理需要导入设置为Is   Readable(可读)


,