class in UnityEngine
/
Inherits from:Object
/
Implemented in:UnityEngine.CoreModule
Switch to ManualThe material class.
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).
In order to get the material used by an object, use the Renderer.material property.
See Also: Materials, Shaders.
color | The main color of the Material. |
doubleSidedGI | Gets and sets whether the Double Sided Global Illumination setting is enabled for this material. |
enableInstancing | Gets and sets whether GPU instancing is enabled for this material. |
globalIlluminationFlags | Defines how the material should interact with lightmaps and lightprobes. |
mainTexture | The main texture. |
mainTextureOffset | The offset of the main texture. |
mainTextureScale | The scale of the main texture. |
passCount | How many passes are in this material (Read Only). |
renderQueue | Render queue of this material. |
shader | The shader used by the material. |
shaderKeywords | Additional shader keywords set by this material. |
Material |
ComputeCRC | Computes a CRC hash value from the content of the material. |
CopyPropertiesFromMaterial | Copy properties from other material into this material. |
DisableKeyword | Unset a shader keyword. |
EnableKeyword | Sets a shader keyword that is enabled by this material. |
FindPass | Returns the index of the pass passName. |
GetColor | Get a named color value. |
GetColorArray | Get a named color array. |
GetFloat | Get a named float value. |
GetFloatArray | Get a named float array. |
GetInt | Get a named integer value. |
GetMatrix | Get a named matrix value from the shader. |
GetMatrixArray | Get a named matrix array. |
GetPassName | Returns the name of the shader pass at index pass. |
GetShaderPassEnabled | Checks whether a given Shader pass is enabled on this Material. |
GetTag | Get the value of material's shader tag. |
GetTexture | Get a named texture. |
GetTextureOffset | Gets the placement offset of texture propertyName. |
GetTexturePropertyNameIDs | Return the name IDs of all texture properties exposed on this material. |
GetTexturePropertyNames | Returns the names of all texture properties exposed on this material. |
GetTextureScale | Gets the placement scale of texture propertyName. |
GetVector | Get a named vector value. |
GetVectorArray | Get a named vector array. |
HasProperty | Checks if material's shader has a property of a given name. |
IsKeywordEnabled | Is the shader keyword enabled on this material? |
Lerp | Interpolate properties between two materials. |
SetBuffer | Sets a named ComputeBuffer value. |
SetColor | Sets a named color value. |
SetColorArray | Sets a color array property. |
SetConstantBuffer | Sets a ComputeBuffer as a named constant buffer for the material. |
SetFloat | Sets a named float value. |
SetFloatArray | Sets a float array property. |
SetInt | Sets a named integer value. |
SetMatrix | Sets a named matrix for the shader. |
SetMatrixArray | Sets a matrix array property. |
SetOverrideTag | Sets an override tag/value on the material. |
SetPass | Activate the given pass for rendering. |
SetShaderPassEnabled | Enables or disables a Shader pass on a per-Material level. |
SetTexture | Sets a named texture. |
SetTextureOffset | Sets the placement offset of texture propertyName. |
SetTextureScale | Sets the placement scale of texture propertyName. |
SetVector | Sets a named vector value. |
SetVectorArray | Sets a vector array property. |
hideFlags | Should the object be hidden, saved with the Scene or modifiable by the user? |
name | The name of the object. |
GetInstanceID | Returns the instance id of the object. |
ToString | Returns the name of the object. |
Destroy | Removes a GameObject, component or asset. |
DestroyImmediate | Destroys the object obj immediately. You are strongly recommended to use Destroy instead. |
DontDestroyOnLoad | Do not destroy the target Object when loading a new Scene. |
FindObjectOfType | Returns the first active loaded object of Type type. |
FindObjectsOfType | Returns a list of all active loaded objects of Type type. |
Instantiate | Clones the object original and returns the clone. |
bool | Does the object exist? |
operator != | Compares if two objects refer to a different object. |
operator == | Compares two object references to see if they refer to the same object. |