布の有効/無効を設定します。
これはインスペクターのコンポーネントラベルの横にあるチェックボックスと同じものです。 無効にした布コンポーネントは物理シミュレーションの更新を行いません。なので布シミュレーションのようなCPUを酷使してしまうのが必要ない時、 布オブジェクトのシミュレーションを一時停止させることが可能です。
GetComponent(InteractiveCloth).enabled = false;
using UnityEngine; using System.Collections; public class ExampleClass : MonoBehaviour { void Example() { GetComponent<InteractiveCloth>().enabled = false; } }
import UnityEngine import System.Collections public class ExampleClass(MonoBehaviour): def Example() as void: GetComponent[of InteractiveCloth]().enabled = false