Version: 2020.2

Shader.GetPropertyDefaultVectorValue

切换到手册
public Vector4 GetPropertyDefaultVectorValue (int propertyIndex);

参数

propertyIndex 着色器属性的索引。

描述

返回指定索引处的着色器属性的默认 Vector4 值。

着色器属性声明块会指定默认值。

如果 Unity 在指定索引处找不到属性,该函数将抛出 /ArgumentOutOfRangeException/。 如果属性类型不是 Color 或 Vector,该函数将抛出 /ArgumentException/。</description>