Material 材质

Inherits from Object

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).

此类暴露了一个材质的所有属性,允许您对它们进行动画处理。你也可以使用它来设置自定义的Shader属性,但是无法通过检视面板访问属性(例如矩阵)。

In order to get the material used by an object, use the Renderer.material property:

为了获得一个对象使用的材质,可以使用 Renderer.material 属性:

参考:Materials

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public void Awake() {
		renderer.material.color = Color.red;
	}
}
renderer.material.color = Color.red;

Variables变量

Constructors构造器

Functions函数

Inherited members继承成员

Inherited Variables继承变量

Inherited Functions继承函数

Inherited Class Functions继承类函数

Page last updated: 2011-9-12