Version: 2019.3

Material

class in UnityEngine

/

継承:Object

マニュアルに切り替える

説明

マテリアルクラス

This class exposes all properties from a material, allowing you to animate them. You can also use it to set custom shader properties that can't be accessed through the inspector (e.g. matrices).

オブジェクトにより使用されているマテリアルを取得するには Renderer.material プロパティーを使用します。

See Also: Materials, Shaders.

変数

colorマテリアルの色
doubleSidedGIGets and sets whether the Double Sided Global Illumination setting is enabled for this material.
enableInstancingGets and sets whether GPU instancing is enabled for this material.
globalIlluminationFlagsマテリアルがライトマップとライトプローブをどのように操作するかを定義します
mainTextureマテリアルのテクスチャ
mainTextureOffsetメインテクスチャのオフセット
mainTextureScaleメインテクスチャのスケール
passCountマテリアルのパスの数(読み取り専用)
renderQueueマテリアルのレンダーキュー
shaderマテリアルで使用するシェーダー
shaderKeywordsマテリアルに設定される追加シェーダーキーワード

コンストラクタ

Material

Public 関数

CopyPropertiesFromMaterialマテリアルのプロパティーを他のマテリアルにコピーします
DisableKeywordセットしたシェーダーキーワードを取り消します
EnableKeywordSets a shader keyword that is enabled by this material.
FindPassReturns the index of the pass passName.
GetColor設定された名前から色を取得します
GetColorArrayGet a named color array.
GetFloat設定された名前から float 値を取得します
GetFloatArrayGet a named float array.
GetInt設定された名前から int 値を取得します
GetMatrix設定された名前から matrix 値を取得します
GetMatrixArrayGet a named matrix array.
GetPassNameReturns the name of the shader pass at index pass.
GetShaderPassEnabledChecks whether a given Shader pass is enabled on this Material.
GetTagマテリアルのシェーダーのタグ名を取得します
GetTexture設定された名前からテクスチャを取得します
GetTextureOffsetテクスチャのプロパティー名から画像のオフセットを取得します
GetTexturePropertyNameIDsReturn the name IDs of all texture properties exposed on this material.
GetTexturePropertyNamesReturns the names of all texture properties exposed on this material.
GetTextureScaleテクスチャのプロパティー名から画像の大きさを取得します
GetVectorプロパティー名から Vector4 型の値を取得します
GetVectorArrayGet a named vector array.
HasPropertyシェーダーのプロパティーに特定のプロパティー名が設定されているか確認します
IsKeywordEnabledマテリアル上でシェーダーキーワードが有効になっているかどうか
Lerp2 つのマテリアルを時間をかけて変更させます
SetBufferSets a named ComputeBuffer value.
SetColorSets a named color value.
SetColorArraySets a color array property.
SetFloatSets a named float value.
SetFloatArraySets a float array property.
SetIntSets a named integer value.
SetMatrixSets a named matrix for the shader.
SetMatrixArraySets a matrix array property.
SetOverrideTagマテリアルの Tag/Value を上書きに設定します
SetPassレンダリングのための特定のパスを有効にします
SetShaderPassEnabledEnables or disables a Shader pass on a per-Material level.
SetTextureSets a named texture.
SetTextureOffsetテクスチャのオフセットを設定します
SetTextureScaleテクスチャのスケールを設定します
SetVectorSets a named vector value.
SetVectorArraySets a vector array property.

継承メンバー

変数

hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
nameオブジェクト名

Public 関数

GetInstanceIDオブジェクトのインスタンス ID を返します
ToStringReturns the name of the object.

Static 関数

DestroyRemoves a GameObject, component or asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadDo not destroy the target Object when loading a new Scene.
FindObjectOfTypeタイプ type から最初に見つけたアクティブのオブジェクトを返します
FindObjectsOfTypeタイプから見つけたすべてのアクティブのオブジェクト配列を返します
Instantiateoriginal のオブジェクトをクローンします

Operator

boolオブジェクトが存在するかどうか
operator !=二つのオブジェクトが異なるオブジェクトを参照しているか比較します
operator ==2つのオブジェクト参照が同じオブジェクトを参照しているか比較します。
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961