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