FindKeyword(string)
Searches for a local shader keyword with a given name in the keyword space.
Read time 1 minuteLast updated 9 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Rendering
- Assembly: UnityEngine.CoreModule
public LocalKeyword FindKeyword(string name)
Parameters
The name of the shader keyword to search for.
Returns
Type | Description |
|---|---|
| LocalKeyword | Returns a valid LocalKeyword if it's present in the keyword space. Otherwise, returns an invalid LocalKeyword. |
Remarks
Use this method to efficiently retrieve a local shader keyword with a given name. The resulting keyword's LocalKeyword.isValid property indicates whether the keyword exists in this local keyword space.
Additional Resources: LocalKeyword, LocalKeyword.isValid, Shader.keywordSpace, ComputeShader.keywordSpace.