Version: 2022.1
public bool isValid ;

描述

Specifies whether this local shader keyword is valid (Read Only).

A local shader keyword is invalid if: It doesn't exist in the local keyword space of the shader or compute shader you pass into the constructor. If Unity can't find it when you call LocalKeywordSpace.FindKeyword. If you use an invalid local shader keyword as an argument for Material.EnableKeyword, Material.DisableKeyword, ComputeShader.EnableKeyword, or ComputeShader.DisableKeyword, it has no effect. If you use an invalid local shader keyword as an argument for Material.IsKeywordEnabled or ComputeShader.IsKeywordEnabled, these functions return false.

See Also: LocalKeywordSpace, Material.EnableKeyword, Material.DisableKeyword, ComputeShader.EnableKeyword, ComputeShader.DisableKeyword, [Material.IsKeywordEnabled]], ComputeShader.IsKeywordEnabled.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961