Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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

public LocalKeyword FindKeyword(string name)

Parameters

name

The name of the shader keyword to search for.

Returns

Type

Description

LocalKeywordReturns 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.