Version: 5.3 (switch to 5.4b)
言語English
  • C#
  • JS

スクリプト言語

好きな言語を選択してください。選択した言語でスクリプトコードが表示されます。

Material.GetColor

マニュアルに切り替える
public Color GetColor(string propertyName);
public Color GetColor(int nameID);

パラメーター

説明

設定された名前から色を取得します

多くのシェーダーでは複数の色を使用します。GetColor によりプロパティー名( propertyName )から色を取得します。

Common color names used by Unity's builtin shaders:
"_Color" is the main color of a material. This can also be accessed via color property.
"_SpecColor" is the specular color of a material (used in specular/glossy/vertexlit shaders).
"_EmissionColor" is the emissive color of a material (used in vertexlit shaders).
"_ReflectColor" 反射する色。reflective のシェーダーで使用できます。

See Also: color property, SetColor, Shader.PropertyToID.