collider.sharedmaterial 共享材质

2015-1-4 18:47| 发布者: 杨炎| 查看: 2085| 评论: 0|原作者: 蛮牛|来自: yzc88亚洲城脚本manual

摘要: collider.sharedmaterial 共享材质varsharedmaterial:physicmaterialdescription描述the shared physic material of this collider.碰撞器的共享物理材质。modifying this material will change the surface propert ...

collider.sharedmaterial 共享材质

varsharedmaterial:physicmaterial

description描述

the shared physic material of this collider.

碰撞器的共享物理材质。

modifying this material will change the surface properties of all colliders using the material. in most cases you want to modifycollider.materialinstead.

修改材质将改变所有碰撞器使用该材质的表面属性,大多数情况下你可以修改collider.material替代。

c#

javascript

using unityengine;

using system.collections;

public class example :monobehaviour{

public physicmaterial material;

public void awake() {

collider.sharedmaterial = material;

}

}

var material : physicmaterial;

collider.sharedmaterial = material;

相关阅读

文章点评
相关文章