[]3d项目-unity添加物理组件 layanative2 打包android平台 报错 btCollisionObject undefined
3d项目-unity添加物理组件 layanative2 打包android平台 报错 btCollisionObject undefined环境
LayaAir IDE 2.0.0 beta2
3d示例项目
layanative2 -v v2.0.2
index.js 引用 web和小游戏平台 都是正常的
测试安卓平台打包异常
具体日志
LayaAir IDE 2.0.0 beta2
3d示例项目
layanative2 -v v2.0.2
index.js 引用 web和小游戏平台 都是正常的
/**
* 设置LayaNative屏幕方向,可设置以下值
* landscape 横屏
* portrait 竖屏
* sensor_landscape 横屏(双方向)
* sensor_portrait 竖屏(双方向)
*/
window.screenOrientation = "sensor_portrait";
//-----libs-begin-----
loadLib("libs/laya.core.js")
loadLib("libs/laya.webgl.js")
// loadLib("libs/laya.ui.js")
loadLib("libs/laya.d3.js")
// loadLib("libs/laya.physics.js")
loadLib("libs/laya.physics3D.js")
// loadLib("libs/laya.physics3D.wasm.js")
//-----libs-end-------
//-----self-libs-----
loadLib("libs/common/Tool.js")
loadLib("libs/common/CameraMoveScript.js")
loadLib("js/bundle.js");
测试安卓平台打包异常
具体日志
10-15 16:43:46.702: I/LayaBox(3503): alert=出错啦,请把此信息截图给研发商
10-15 16:43:46.702: I/LayaBox(3503): TypeError: Cannot read property 'btCollisionObject' of undefined
10-15 16:43:46.702: I/LayaBox(3503): http://stand.alone.version/libs/laya.d3.js:37260:
10-15 16:43:46.702: I/LayaBox(3503): TypeError: Cannot read property 'btCollisionObject' of undefined
10-15 16:43:46.702: I/LayaBox(3503): var btColObj=new physics3D.btCollisionObject();
10-15 16:43:46.702: I/LayaBox(3503): ^^
10-15 16:43:46.702: I/LayaBox(3503): TypeError: Cannot read property 'btCollisionObject' of undefined
10-15 16:43:46.702: I/LayaBox(3503): at PhysicsCollider.__proto._onAdded (http://stand.alone.version/libs/laya.d3.js:37260:30)
10-15 16:43:46.702: I/LayaBox(3503): at MeshSprite3D.__proto._addComponentInstance (http://stand.alone.version/lib ... 3660:8)
10-15 16:43:46.702: I/LayaBox(3503): at MeshSprite3D.__proto.addComponent (http://stand.alone.version/lib ... 3731:8)
10-15 16:43:46.702: I/LayaBox(3503): at Function.Utils3D._createNodeByJson (http://stand.alone.version/libs/laya.d3.js:14491:25)
10-15 16:43:46.702: I/LayaBox(3503): at Function.Utils3D._createNodeByJson (http://stand.alone.version/libs/laya.d3.js:14481:23)
10-15 16:43:46.702: I/LayaBox(3503): at Function.Sprite3D._parse (http://stand.alone.version/libs/laya.d3.js:27540:22)
10-15 16:43:46.702: I/LayaBox(3503): at Laya3D._onHierarchyInnerFirstLevResouLoaded (
10-15 16:43:46.702: E/LayaBox(3503): ==JSERROR:
10-15 16:43:46.702: E/LayaBox(3503): http://stand.alone.version/libs/laya.d3.js:37260:
10-15 16:43:46.702: E/LayaBox(3503): TypeError: Cannot read property 'btCollisionObject' of undefined
10-15 16:43:46.702: E/LayaBox(3503): var btColObj=new physics3D.btCollisionObject();
10-15 16:43:46.702: E/LayaBox(3503): ^^
10-15 16:43:46.702: E/LayaBox(3503): TypeError: Cannot read property 'btCollisionObject' of undefined
10-15 16:43:46.702: E/LayaBox(3503): at PhysicsCollider.__proto._onAdded (http://stand.alone.version/libs/laya.d3.js:37260:30)
10-15 16:43:46.702: E/LayaBox(3503): at MeshSprite3D.__proto._addComponentInstance (http://stand.alone.version/lib ... 3660:8)
10-15 16:43:46.702: E/LayaBox(3503): at MeshSprite3D.__proto.addComponent (http://stand.alone.version/lib ... 3731:8)
10-15 16:43:46.702: E/LayaBox(3503): at Function.Utils3D._createNodeByJson (http://stand.alone.version/libs/laya.d3.js:14491:25)
10-15 16:43:46.702: E/LayaBox(3503): at Function.Utils3D._createNodeByJson (http://stand.alone.version/libs/laya.d3.js:14481:23)
10-15 16:43:46.702: E/LayaBox(3503): at Function.Sprite3D._parse (http://stand.alone.version/libs/laya.d3.js:27540:22)
10-15 16:43:46.702: E/LayaBox(3503): at Laya3D._onHierarchyInnerFirstLevResouLoaded (http://stand.alone.version/libs/laya.d3.js:15299:21)
10-15 16:43:46.702: E/LayaBox(3503): at Handler.__proto.run (http://stand.alone.versio
10-15 16:43:46.743: W/EGL_emulation(3503): eglSurfaceAttrib not implemented
10-15 16:43:46.743: W/OpenGLRenderer(3503): Failed to set EGL_SWAP_BEHAVIOR on surface 0x9e2a9f80, error=EGL_SUCCESS
没有找到相关结果
已邀请:
2 个回复
Aar0n
赞同来自: happyfire
Aar0n
赞同来自: 189*****385