所有的预制突然都打不开了,求助!

  • Creator 版本:2.1.0

  • 详细报错信息,包含调用堆栈:

TypeError: Cannot read property ‘clear’ of null
at callonDestroyInTryCatch (eval at misc.tryCatchFunctor_EDITOR (/Applications/CocosCreator.app/Contents/Resources/engine/bin/.cache/dev/cocos2d/core/utils/misc.js:65:24), :7:28)
at CCClass.destroyComp (/Applications/CocosCreator.app/Contents/Resources/engine/bin/.cache/dev/cocos2d/core/node-activator.js:256:25)
at cc_Graphics._onPreDestroy (/Applications/CocosCreator.app/Contents/Resources/engine/bin/.cache/dev/cocos2d/core/components/CCComponent.js:152:44)
at cc_Graphics.prototype._destroyImmediate (/Applications/CocosCreator.app/Contents/Resources/engine/bin/.cache/dev/cocos2d/core/platform/CCObject.js:230:22)
at cc_Node._onPreDestroy [as _onPreDestroyBase] (/Applications/CocosCreator.app/Contents/Resources/engine/bin/.cache/dev/cocos2d/core/utils/base-node.js:683:31)
at cc_Node._onPreDestroy (/Applications/CocosCreator.app/Contents/Resources/engine/bin/.cache/dev/cocos2d/core/CCNode.js:639:44)
at cc_Node.prototype._destroyImmediate (/Applications/CocosCreator.app/Contents/Resources/engine/bin/.cache/dev/cocos2d/core/platform/CCObject.js:230:22)
at Function.deferredDestroy (/Applications/CocosCreator.app/Contents/Resources/engine/bin/.cache/dev/cocos2d/core/platform/CCObject.js:80:25)
at cc.Director.runSceneImmediate (/Applications/CocosCreator.app/Contents/Resources/engine/bin/.cache/dev/cocos2d/core/CCDirector.js:209:21)

项目开发了一段时间了,所有的预制都打不开了,表现为元素都看不到。求助

新建prefab也会出现这种情况

  • 删除项目中的 library,local,temp三个文件夹
  • 如果异常还在尝试删除用户目录下的。CocosCreator目录
  • 如果有版本控制或保存了项目,那么就对比下异常的位置自行修改下。