Quantcast
Channel: Cocos中文社区 - 最新主题
Viewing all articles
Browse latest Browse all 88759

开启cocoscreator物理引擎后跳转场景报错

$
0
0

@nwc1245 写道:

问题原因如题,排除了所有原因后只在场景内使用 cc.director.getPhysicsManager().enabled = true后,只调用 cc.director.loadScene("main");就产生了致命bug导致游戏无法继续运行。网上也没有发现这个问题的描述,只好过来求助了,还望谅解相关信息的朋友们指点一下。报错信息如下:
初始错误
TypeError: Cannot set property 'body' of undefined
at CCClass._removeBody (http://localhost:7456/app/engine/bin/cocos2d-js-for-preview.js:27499:27)
at cc_RigidBody.__destroy (http://localhost:7456/app/engine/bin/cocos2d-js-for-preview.js:28243:41)
at CCClass.pushDelayEvent (http://localhost:7456/app/engine/bin/cocos2d-js-for-preview.js:27362:27)
at cc_RigidBody._destroy (http://localhost:7456/app/engine/bin/cocos2d-js-for-preview.js:28217:41)
at cc_RigidBody.onDisable (http://localhost:7456/app/engine/bin/cocos2d-js-for-preview.js:28187:14)
at CCClass.disableComp (http://localhost:7456/app/engine/bin/cocos2d-js-for-preview.js:15040:34)
at CCClass._deactivateNodeRecursively (http://localhost:7456/app/engine/bin/cocos2d-js-for-preview.js:27036:40)
at CCClass._deactivateNodeRecursively (http://localhost:7456/app/engine/bin/cocos2d-js-for-preview.js:27046:18)
at CCClass.activateNode (http://localhost:7456/app/engine/bin/cocos2d-js-for-preview.js:27067:16)
at cc_Node.set as active
不断循环重复报出的错误
TypeError: Cannot read property 'x' of null
at cc_Node.setScale (http://localhost:7456/app/engine/bin/cocos2d-js-for-preview.js:7450:23)
at cc_Button._resetState (http://localhost:7456/app/engine/bin/cocos2d-js-for-preview.js:15719:164)
at cc_Button.onDisable (http://localhost:7456/app/engine/bin/cocos2d-js-for-preview.js:15731:14)
at CCClass.disableComp (http://localhost:7456/app/engine/bin/cocos2d-js-for-preview.js:15040:34)
at CCClass.destroyComp (http://localhost:7456/app/engine/bin/cocos2d-js-for-preview.js:27098:36)
at cc_Button._onPreDestroy (http://localhost:7456/app/engine/bin/cocos2d-js-for-preview.js:16231:36)
at cc_Button.207.prototype._destroyImmediate (http://localhost:7456/app/engine/bin/cocos2d-js-for-preview.js:31577:34)
at cc_Node._onPreDestroy (http://localhost:7456/app/engine/bin/cocos2d-js-for-preview.js:41480:21)
at cc_Node._onPreDestroy (http://localhost:7456/app/engine/bin/cocos2d-js-for-preview.js:10412:36)
at cc_Node.207.prototype._destroyImmediate (http://localhost:7456/app/engine/bin/cocos2d-js-for-preview.js:31577:34)

帖子: 1

参与者: 1

阅读整个主题


Viewing all articles
Browse latest Browse all 88759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>