用于控制着色器属性行为方式的标志。
Unity 编辑器在编译 ShaderLab 脚本时,它根据为其着色器属性分配的特性为着色器属性分配着色器属性标志。例如,如果向着色器属性声明中添加 "[HideInInspector]" 特性,Unity 将在编译脚本时设置 HideInInspector 标志。如果向一个属性中添加多个特性,编辑器将使用按位 OR 运算组合标志。
None | 未设置任何标志。 |
HideInInspector | 表示 Unity 在默认材质检视面板中隐藏属性。 |
PerRendererData | In the Material Inspector, Unity queries the value for this property from the Renderer's MaterialPropertyBlock, instead of from the Material. The value will also appear as read-only. |
NoScaleOffset | 在默认材质检视面板中的纹理旁边不显示 UV 缩放/偏移字段。 |
Normal | 表示此属性的值包含标准(标准化矢量)数据。 |
HDR | 表示此属性的值包含高动态范围 (HDR) 数据。 |
Gamma | 表示此属性的值位于伽马空间。如果活动颜色空间为线性,Unity 将这些值转换为线性空间值。 |
NonModifiableTextureData | 不能在默认材质检视面板中编辑此纹理属性。 |
MainTexture | 表示此属性的值包含材质的主纹理。 |
MainColor | 表示此属性的值包含材质的主色。 |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.