Skip to content

Format

typescript
Material.EnableKeyword(value)

class: Material

Description

Enables the local shader keyword for this material.

This method allows you to enable specific keywords at runtime, which will activate corresponding features in the shader.

Parameters

param_nametypedescription
valuestring

Return

typedescription
void

Code Example

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