Version: 5.6
public void SetFloatArray (string name, float[] values);
public void SetFloatArray (int nameID, float[] values);
public void SetFloatArray (string name, List<float> values);
public void SetFloatArray (int nameID, List<float> values);

パラメーター

name プロパティー名
nameID Property name ID. Use Shader.PropertyToID to get this ID.
values 設定する配列の値

説明

Sets a float array property.

マテリアルに float 配列プロパティーを設定します。指定された名の float 配列プロパティーがすでに存在する場合は、古いものが新しい値に置き換えられます。

いったん、配列をブロックに加えると、配列の長さは変更できません。後で、同じプロパティーに初めのものより長い配列を設定しようとすると、配列の長さは最初の長さに制限され、それを超える分の要素は無視されます。初めのものより短い配列を設定しようとすると、新しい値は配列に割り当てられますが、余った配列の部分には古い値が残ります。

Array parameters are not exposed in the material inspector, nor serialized with the material asset. But they can be set and queried with SetFloatArray, SetColorArray, SetVectorArray, SetMatrixArray and the corresponding getters from scripts at runtime.

See Also: GetFloatArray.