Material.GetTag 获取标签
function GetTag (tag : string, searchFallbacks : bool, defaultValue : string = "") : string
Description描述
Get the value of material's shader tag.
获取材质着色器的标签值
If the material's shader does not define the tag, defaultValue is returned.
如果材质的着色器未定义标签,则返回默认值。
If searchFallbacks is true then this function will look for tag in all subshaders and all fallbacks.If seachFallbacks is false then only the currently used subshader will be queried for the tag.
如果 searchFallbacks 是true此函数将查找所有的子级着色器(subshader)和所有的后备标签。如果 seachFallbacks 是false此函数仅在当前使用的子级着色器(subshader)中查询标签。
Using GetTag without searching through fallbacks makes it possible to detect which subshader is currently being used: add a custom tag to each subshader with different value, and query the value at run time. For example, Unity Pro's water uses this function to detec