unity3d 代码 添加和删除脚本,或者其他属性

来源:互联网 发布:php采集代码 编辑:程序博客网 时间:2024/05/10 03:20
//tempQie2为GameObject,qiemove为自定义的脚本类名称tempQie2.AddComponent<qiemove>();//添加绑定脚本Destroy(tempQie2.GetComponent("qiemove"));//删除绑定脚本//如果添加其他属性,可AddComponent<其他类定义>();

0 0
原创粉丝点击