Format
typescript
Material.DisableKeyword(value)class: Material
Description
Disables the local shader keyword for this material.
This method can be used to disable a specific keyword at runtime, effectively turning off certain functionality related to that keyword in the shader. When a keyword is disabled, the associated code block will not be compiled and executed, reducing unnecessary computations and optimizing rendering performance.
Parameters
| param_name | type | description |
|---|---|---|
| value | string |
Return
| type | description |
|---|---|
void |
Code Example
typescript
let material = Resources.Load<Material>(Material, "materialId");
material.DisableKeyword("keyword");