Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


EnableShaderKeyword(string)

Adds a command to enable a global keyword with a given name.
Read time 1 minuteLast updated 6 days ago

Definition

public void EnableShaderKeyword(string keyword)

Parameters

keyword

Name of a global shader keyword to enable.

Remarks

If a global keyword with the name you pass in does not exist, Unity creates one with that name when you call this function. To get all the global keywords that already exist, use Shader.globalKeywords. Note: it is more efficient to use CommandBuffer.EnableKeyword.