Skip to content

Format

typescript
Material.HasTexture(name)

class: Material

Description

Check if the current material has a Texture property.

Parameters

param_nametypedescription
namestringThe name of the property.

Return

typedescription
booleanWhether the material has a Texture property.

Code Example

typescript
let material = Resources.Load<Material>(Material, "materialId");
material.HasTexture("_Texture");