Material Inherits from ObjectThe 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, ShaderLab documentation.
JavaScripts
renderer.material.color = Color.red;
using UnityEngine;
using System.Collections; public class example : MonoBehaviour { void Awake() { renderer.material.color = Color.red; } } import UnityEngine
import System.Collections class example(MonoBehaviour): def Awake(): renderer.material.color = Color.red Variables
Constructors
Functions
Inherited members
Inherited Variables
Inherited Functions
Inherited Class Functions
|
