Skip to content

Format

typescript
Texture.graphicFormat

class: Texture

Description

(Read Only) The pixel format of the current texture.

The pixel format affects the memory usage and GPU performance of the texture. Different pixel formats are suitable for different texture purposes, such as color textures, normal maps, depth textures, etc. For more information, see GraphicsFormat.

Parameters

param_nametypedescription

Return

typedescription
GraphicsFormatThe pixel format of the current texture.

Code Example

typescript
let texture = Resources.Load<Texture>(Texture, "textureId");
texture.graphicFormat;