找回密碼
 注冊帳號

掃一掃,訪問微社區

cloth.enabled 啟用?

2015-1-4 13:37| 發布者: 楊炎| 查看: 1767| 評論: 0|原作者: 蠻牛|來自: unity3d腳本manual

摘要: cloth.enabled 啟用?varenabled: booldescription描述is this cloth enabled?是否啟用這個布料?this is the same as the checkbox next to the component label in the inspector. a disabled cloth component will ...

cloth.enabled 啟用?

varenabled: bool

description描述

is this cloth enabled?

是否啟用這個布料?

this is the same as the checkbox next to the component label in the inspector. a disabled cloth component will not update it's physics simulation, so you can use this to suspend the simulation of cloth objects when they are not needed, as cloth simulation is a very cpu-intensive task.

這如同component旁的復選框一樣。一個使布料組件不更新的屬性,所以你可以在不需要的時候用這個終止;布料模擬是一個非常耗資源的任務。

c#

javascript

using unityengine;

using system.collections;

public class example :monobehaviour{

public void awake() {

getcomponent().enabled = false;

}

}

getcomponent(interactivecloth).enabled = false;

相關閱讀

文章點評
相關文章
女校游泳队彩金