Skip to content

Format

typescript
Texture2D.Apply(mipLevel)

class: Texture2D

Description

Applies the texture data to the texture and updates the modifications made to the texture.

Parameters

param_nametypedescription
mipLevelnumberMipmap level of the texture

Return

typedescription
void

Code Example

typescript
let uuid = "31A9092E126B4B19BBFD9D5FCD75AA49";
let tex = Resources.Load<Texture2D>(Texture2D, uuid);
if (tex == null) {
    throw new Exception("failed to load texture2d: " + uuid);
}
tex.Apply(1);