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);
Page last updated: 2011-5-19