Behaviour.enabled 行为启用

var enabled : bool

Description描述

Enabled Behaviours are Updated, disabled Behaviours are not.

启用行为被更新,禁用行为不更新。

This is shown as the small checkbox in the inspector of the behaviour.

在行为检视面板显示为小的复选框。

GetComponent(PlayerScript).enabled = false;
最后修改:2011年1月25日 Tuesday 22:47

本脚本参考基于Unity 3.4.1f5

英文部分版权属©Unity公司所有,中文部分© Unity圣典 版权所有,未经许可,严禁转载 。