[LayaAirIDE 2.0]动态添加addComponent(Laya.RigidBody)的问题

1.动态添加 this.owner.addComponent(Laya.RigidBody)后; 在调用  this.owner.removeSelf()后会抛错 : laya.core.js:13190 Uncaught 无法实例class RigidBody extends Laya.Component {...
2.但如果将Laya.RigidBody组件直接挂在预制体上,用this.owner.getComponent(Laya.RigidBody)设置后,在调用  this.owner.removeSelf()则不会抛错。
 
T79V@4M4IUVTM9Y3@`Z}9JX.png VR6(3_[DKO{VG5B)KAWI7`3.png
已邀请:

Aar0n

赞同来自:

没复现呢。。。

要回复问题请先

商务合作
商务合作