Unity - Scripting API: LocalKeyword

struct in UnityEngine.Rendering

/

Implemented in:UnityEngine.CoreModule

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Represents a shader keyword declared in a shader source file.

For a ComputeShader:

For a RayTracingShader:

Properties

Property Description
isDynamicSpecifies whether this local shader keyword is used for dynamic branching (Read Only).
isOverridableWhether this local shader keyword can be overridden by a global shader keyword. (Read Only).
isValidSpecifies whether this local shader keyword is valid (Read Only).
nameThe name of the shader keyword (Read Only).
typeThe type of the shader keyword (Read Only).

Constructors

Constructor Description
LocalKeywordInitializes and returns a LocalKeyword struct that represents an existing local shader keyword for a given Shader.

Operators

Operator Description
operator !=Returns true if the shader keywords are not the same. Otherwise, returns false.
operator ==Returns true if the shader keywords are the same. Otherwise, returns false.