nameID | 属性名称 ID,使用 Shader.PropertyToID 获取。 |
value | 要设置的整数值。 |
name | 属性名称,例如“_SrcBlend”。 |
设置指定的整数值。
When setting values on materials using the Standard Shader, you should be aware that you may need to use EnableKeyword to enable features of the shader that were not previously in use. For more detail, read Accessing Materials via Script.
此函数只是 SetFloat 的别名,后者将传递的值转换为浮点数。