Component
- animation
- audio
- BroadcastMessage
- camera
- collider
- CompareTag
- constantForce
- gameObject
- GetComponent.<T>
- GetComponentInChildren.<T>
- GetComponentInChildren
- GetComponents.<T>
- GetComponentsInChildren.<T>
- GetComponentsInChildren
- GetComponents
- GetComponent
- guiTexture
- guiText
- hingeJoint
- light
- networkView
- particleEmitter
- renderer
- rigidbody
- SendMessageUpwards
- SendMessage
- tag
- transform
Component.renderer 渲染器
var renderer : Renderer
Description描述
The Renderer attached to this GameObject (null if there is none attached).
Renderer附加到GameObject(游戏物体)(如无附加则为空)。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
renderer.material.color = Color.red;
}
}
renderer.material.color = Color.red;
最后修改:2010年12月15日 Wednesday 22:20