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.SetActiveRecursively 设置活动状态
function SetActiveRecursively (state : bool) : void
Description描述
Sets the active state of this and all the game objects children to state.
设置游戏物体及其子物体的状态为state。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
gameObject.SetActiveRecursively(true);
}
}
gameObject.SetActiveRecursively(true);
最后修改:2011年5月19日 Thursday 22:18