var scene : Scene3D;
Scene3D.load("res/laya-test.ls",Handler.create(null,function(sp:Scene3D):void{
scene = Laya.stage.addChild(sp) as Scene3D;
}));
找到对应的示例代码了,但是编译报错。。。。用的是layaAir2.0
TypeError: Cannot read property 'btCollisionObject' of undefined
bundle.js:64076
at PhysicsCollider.__proto._onAdded (file:///D:/fish_project/laya-air/myLaya1/bin/js/bundle.js:64076:30)
at Sprite3D.__proto._addComponentInstance (file:///D:/fish_project/laya-air/myLaya1/bin/js/bundle.js:40023:8)
at Sprite3D.__proto.addComponent (file:///D:/fish_project/laya-air/myLaya1/bin/js/bundle.js:40095:8)
at Function.Utils3D._createNodeByJson (file:///D:/fish_project/laya-air/myLaya1/bin/js/bundle.js:14650:25)
at Function.Utils3D._createNodeByJson (file:///D:/fish_project/laya-air/myLaya1/bin/js/bundle.js:14640:23)
at Function.Utils3D._createNodeByJson (file:///D:/fish_project/laya-air/myLaya1/bin/js/bundle.js:14640:23)
at Function.Utils3D._createNodeByJson (file:///D:/fish_project/laya-air/myLaya1/bin/js/bundle.js:14640:23)
at Function.Utils3D._createNodeByJson (file:///D:/fish_project/laya-air/myLaya1/bin/js/bundle.js:14640:23)
at Function.Utils3D._createNodeByJson (file:///D:/fish_project/laya-air/myLaya1/bin/js/bundle.js:14640:23)
at Function.Scene3D._parse (file:///D:/fish_project/laya-air/myLaya1/bin/js/bundle.js:65462:21)
1 个回复
没事喝两杯
赞同来自:
Scene3D.load("res/laya-test.ls",Handler.create(null,function(sp:Scene3D):void{
scene = Laya.stage.addChild(sp) as Scene3D;
}));
找到对应的示例代码了,但是编译报错。。。。用的是layaAir2.0
TypeError: Cannot read property 'btCollisionObject' of undefined
bundle.js:64076
at PhysicsCollider.__proto._onAdded (file:///D:/fish_project/laya-air/myLaya1/bin/js/bundle.js:64076:30)
at Sprite3D.__proto._addComponentInstance (file:///D:/fish_project/laya-air/myLaya1/bin/js/bundle.js:40023:8)
at Sprite3D.__proto.addComponent (file:///D:/fish_project/laya-air/myLaya1/bin/js/bundle.js:40095:8)
at Function.Utils3D._createNodeByJson (file:///D:/fish_project/laya-air/myLaya1/bin/js/bundle.js:14650:25)
at Function.Utils3D._createNodeByJson (file:///D:/fish_project/laya-air/myLaya1/bin/js/bundle.js:14640:23)
at Function.Utils3D._createNodeByJson (file:///D:/fish_project/laya-air/myLaya1/bin/js/bundle.js:14640:23)
at Function.Utils3D._createNodeByJson (file:///D:/fish_project/laya-air/myLaya1/bin/js/bundle.js:14640:23)
at Function.Utils3D._createNodeByJson (file:///D:/fish_project/laya-air/myLaya1/bin/js/bundle.js:14640:23)
at Function.Utils3D._createNodeByJson (file:///D:/fish_project/laya-air/myLaya1/bin/js/bundle.js:14640:23)
at Function.Scene3D._parse (file:///D:/fish_project/laya-air/myLaya1/bin/js/bundle.js:65462:21)