GameObject
- active
- AddComponent.<T>
- AddComponent
- animation
- audio
- BroadcastMessage
- camera
- collider
- CompareTag
- constantForce
- CreatePrimitive
- FindGameObjectsWithTag
- FindWithTag
- Find
- GameObject
- GetComponent.<T>
- GetComponentInChildren.<T>
- GetComponentInChildren
- GetComponents.<T>
- GetComponentsInChildren.<T>
- GetComponentsInChildren
- GetComponents
- GetComponent
- guiTexture
- guiText
- hingeJoint
- isStatic
- layer
- light
- networkView
- particleEmitter
- renderer
- rigidbody
- SampleAnimation
- SendMessageUpwards
- SendMessage
- SetActiveRecursively
- tag
- transform
GameObject.active 是否活动
var active : bool
Description描述
Is the GameObject active? Activates/Deactivates the GameObject.
标识游戏物体是否是活动的,使这个游戏物体活动/不活动。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
gameObject.active = false;
}
}
//使游戏物体不活动.
gameObject.active = false;
最后修改:2011年5月19日 Thursday 22:09