TypeError: Cannot read property ‘_id’ of null
at cc_Node.cc.Class._registerIfAttached (C:\CocosCreator\resources\engine\bin.cache\dev\cocos2d\core\utils\base-node.js:669:51)
at cc_Node.cc.Class._registerIfAttached (C:\CocosCreator\resources\engine\bin.cache\dev\cocos2d\core\utils\base-node.js:683:27)
at cc_Scene.cc.Class._registerIfAttached (C:\CocosCreator\resources\engine\bin.cache\dev\cocos2d\core\utils\base-node.js:683:27)
at cc_Scene._activate (C:\CocosCreator\resources\engine\bin.cache\dev\cocos2d\core\CCScene.js:58:26)
at cc.Director.runSceneImmediate (C:\CocosCreator\resources\engine\bin.cache\dev\cocos2d\core\CCDirector.js:217:23)
at C:\CocosCreator\resources\engine\bin.cache\dev\cocos2d\core\CCDirector.js:327:42
at CCLoader. (C:\CocosCreator\resources\engine\bin.cache\dev\cocos2d\core\platform\CCAssetLibrary.js:63:25)
at C:\CocosCreator\resources\engine\bin.cache\dev\cocos2d\core\load-pipeline\CCLoader.js:134:46
at C:\CocosCreator\resources\engine\bin.cache\dev\cocos2d\core\platform\utils.js:48:25
at _combinedTickCallback (internal/process/next_tick.js:73:7)
报错如上文。现在已经知道哪个物体损毁了(微信工具也无法使用)
:
但是没有办法在不进入场景的前提下去删除该场景的物体。比较常用的方法也都试过了(重启cocos,重启电脑,删除library,还原上次保存),但是都没有用。想知道有没有办法在项目文件中,寻找到保存场景物体的文件去删除该物体呢?
。不过重写过后(原有的资源,脚本都已删除),如果过于快速的在编辑器中撤销,则任然有大概率会出现"_xx" of null的情况。而且通常出现这种问题,都会导致项目崩溃。现在的解决办法是在项目刚出现这个问题时,不保存并且把当前场景“还原到上次保存”,暂时可以直接规避这个问题。至于用notepad查找fire文件的方法也试过了,300个_id,找了2次,并没有找到哪个是为空