Version: 2022.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.

変数

colorThe main color of the Material.
doubleSidedGIGets and sets whether the Double Sided Global Illumination setting is enabled for this material.
enabledKeywordsAn array containing the local shader keywords that are currently enabled for this material.
enableInstancingGets and sets whether GPU instancing is enabled for this material.
globalIlluminationFlagsマテリアルがライトマップとライトプローブをどのように操作するかを定義します
isVariantReturns true if this material is a material variant.
mainTextureThe main texture.
mainTextureOffsetThe offset of the main texture.
mainTextureScaleThe scale of the main texture.
parentParent of this material.
passCountマテリアルのパスの数(読み取り専用)
renderQueueマテリアルのレンダーキュー
shaderマテリアルで使用するシェーダー
shaderKeywordsAn array containing names of the local shader keywords that are currently enabled for this material.

コンストラクタ

Material

Public 関数

ApplyPropertyOverrideApplies an override associated with a Material Variant to a target.
ComputeCRCComputes a CRC hash value from the content of the material.
CopyMatchingPropertiesFromMaterialCopies properties, keyword states and settings from mat to this material, but only if they exist in both materials.
CopyPropertiesFromMaterialマテリアルのプロパティーを他のマテリアルにコピーします
DisableKeywordDisables a local shader keyword for this material.
EnableKeywordEnables a local shader keyword for this material.
FindPassReturns the index of the pass passName.
GetBufferGet a named Graphics Buffer value.
GetColor設定された名前から色を取得します
GetColorArrayGet a named color array.
GetConstantBufferGet a named Constant Buffer value.
GetFloat設定された名前から float 値を取得します
GetFloatArrayGet a named float array.
GetIntThis method is deprecated. Use GetFloat or GetInteger instead.
GetInteger設定された名前から int 値を取得します
GetMatrix設定された名前から matrix 値を取得します
GetMatrixArrayGet a named matrix array.
GetPassNameReturns the name of the shader pass at index pass.
GetPropertyNamesRetrieves a list of the named properties in the material that match the input property type.
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.
HasBufferChecks if the ShaderLab file assigned to the Material has a ComputeBuffer property with the given name.
HasColorChecks if the ShaderLab file assigned to the Material has a Color property with the given name.
HasConstantBufferChecks if the ShaderLab file assigned to the Material has a ConstantBuffer property with the given name.
HasFloatChecks if the ShaderLab file assigned to the Material has a Float property with the given name. This also works with the Float Array property.
HasIntThis method is deprecated. Use HasFloat or HasInteger instead.
HasIntegerChecks if the ShaderLab file assigned to the Material has an Integer property with the given name.
HasMatrixChecks if the ShaderLab file assigned to the Material has a Matrix property with the given name. This also works with the Matrix Array property.
HasPropertyChecks if the ShaderLab file assigned to the Material has a property with the given name.
HasTextureChecks if the ShaderLab file assigned to the Material has a Texture property with the given name.
HasVectorChecks if the ShaderLab file assigned to the Material has a Vector property with the given name. This also works with the Vector Array property.
IsChildOfReturns True if the given material is an ancestor of this Material.
IsKeywordEnabledChecks whether a local shader keyword is enabled for this material.
IsPropertyLockedChecks whether a property is locked by this material.
IsPropertyLockedByAncestorChecks whether a property is locked by any of ancestor of this material.
IsPropertyOverridenChecks whether a property is overriden by this material.
Lerp2 つのマテリアルを時間をかけて変更させます
RevertAllPropertyOverridesRemoves all property overrides on this material.
RevertPropertyOverrideRemoves the override on a property.
SetBufferSets a named buffer value.
SetColorSets a color value.
SetColorArraySets a color array property.
SetConstantBufferSets a ComputeBuffer or GraphicsBuffer as a named constant buffer for the material.
SetFloatSets a named float value.
SetFloatArraySets a float array property.
SetIntThis method is deprecated. Use SetFloat or SetInteger instead.
SetIntegerSets a named integer value.
SetKeywordSets the state of a local shader keyword for this material.
SetMatrixSets a named matrix for the shader.
SetMatrixArraySets a matrix array property.
SetOverrideTagマテリアルの Tag/Value を上書きに設定します
SetPassレンダリングのための特定のパスを有効にします
SetPropertyLockSets the lock state of a property for this material.
SetShaderPassEnabledEnables or disables a Shader pass on a per-Material level.
SetTextureSets a named texture.
SetTextureOffsetSets the placement offset of a given texture. The name parameter is defined in the shader. This method creates a new Material instance.
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 関数

GetInstanceIDGets the instance ID of the object.
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.
FindAnyObjectByTypeRetrieves any active loaded object of Type type.
FindFirstObjectByTypeRetrieves the first active loaded object of Type type.
FindObjectOfTypeタイプ type から最初に見つけたアクティブのオブジェクトを返します
FindObjectsByTypeRetrieves a list of all loaded objects of Type type.
FindObjectsOfTypeGets a list of all loaded objects of Type type.
Instantiateoriginal のオブジェクトをクローンします

Operator

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