The 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 material's color. |
globalIlluminationFlags | Defines how the material should interact with lightmaps and lightprobes. |
mainTexture | The material's texture. |
mainTextureOffset | The texture offset of the main texture. |
mainTextureScale | The texture 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. |
CopyPropertiesFromMaterial | Copy properties from other material into this material. |
DisableKeyword | Unset a shader keyword. |
EnableKeyword | Set a shader keyword that is enabled by this material. |
GetColor | Get a named color value. |
GetFloat | Get a named float value. |
GetInt | Get a named integer value. |
GetMatrix | Get a named matrix value from the shader. |
GetTag | Get the value of material's shader tag. |
GetTexture | Get a named texture. |
GetTextureOffset | Gets the placement offset of texture propertyName. |
GetTextureScale | Gets the placement scale of texture propertyName. |
GetVector | Get a named vector value. |
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 | Set a ComputeBuffer value. |
SetColor | Set a named color value. |
SetFloat | Set a named float value. |
SetInt | Set a named integer value.When setting values on materials using the Standard Shader, you should be aware that you may need to use EnableKeyword to enable features of the shader that were not previously in use. For more detail, read Accessing Materials via Script. |
SetMatrix | Set a named matrix for the shader. |
SetOverrideTag | Sets an override tag/value on the material. |
SetPass | Activate the given pass for rendering. |
SetTexture | Set a named texture. |
SetTextureOffset | Sets the placement offset of texture propertyName. |
SetTextureScale | Sets the placement scale of texture propertyName. |
SetVector | Set a named vector value. |
hideFlags | Should the object be hidden, saved with the scene or modifiable by the user? |
name | El nombre del objeto. |
GetInstanceID | Returns the instance id of the object. |
ToString | Devuelve el nombre del objeto. |
Destroy | Elimina un gameobject, componente o asset. |
DestroyImmediate | Destroys the object obj immediately. You are strongly recommended to use Destroy instead. |
DontDestroyOnLoad | Makes the object target not be destroyed automatically when loading a new scene. |
FindObjectOfType | Devuelve el primer objeto activo cargado de tipo type. |
FindObjectsOfType | Devuelve una lista de todos los objetos activos cargados de tipo type. |
Instantiate | Devuelve el nombre del objeto. |
bool | ¿Existe el objeto? |
operator != | Compares if two objects refer to a different object. |
operator == | Compares two object references to see if they refer to the same object. |