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

スクリプト言語

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

Material.GetTexture

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

パラメーター

説明

設定された名前からテクスチャを取得します

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

Common texture names used by Unity's builtin shaders:
"_MainTex" is the main diffuse texture. This can also be accessed via mainTexture property.
"_BumpMap" is the normal map.
"_Cube" リフレクションキューブマップ

See Also: mainTexture property, SetTexture, Shader.PropertyToID.