Skip to content

Format

typescript
Material.HasColor(name)

class: Material

Description

Check if the current material has a Color property with the specified name.

Parameters

param_nametypedescription
namestringThe name of the property.

Return

typedescription
booleanTrue if the material has a Color property with the specified name, otherwise false.

Code Example

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