报了这个错之后 点击关闭按钮就关不了cocos了。也不能切换场景了
[Scene] The thing you want to instantiate is nil
at Object.instantiate (D:\cocos\Creator\3.3.1\resources\resources\3d\engine\bin.cache\dev\editor\bundled\index.js:101811:15)
at PrefabUtil.getDumpableNode (D:\cocos\Creator\3.3.1\resources\app.asar\builtin\scene\dist\script\3d\manager\prefab\utils.ccc:1:3541)
at PrefabSceneProxy.serialize (D:\cocos\Creator\3.3.1\resources\app.asar\builtin\scene\dist\script\3d\manager\scene\proxy\prefab-scene-proxy.ccc:1:4119)
at PrefabSceneProxy.save (D:\cocos\Creator\3.3.1\resources\app.asar\builtin\scene\dist\script\3d\manager\scene\proxy\prefab-scene-proxy.ccc:1:4504)
at async PrefabSceneFacade.saveScene (D:\cocos\Creator\3.3.1\resources\app.asar\builtin\scene\dist\script\3d\facade\general-scene-facade.ccc:1:5636)
at async SceneFacadeManager.saveScene (D:\cocos\Creator\3.3.1\resources\app.asar\builtin\scene\dist\script\3d\facade\scene-facade-manager.ccc:1:11316)
Message response error: The thing you want to instantiate is nil
at EventEmitter. (D:\cocos\Creator\3.3.1\resources\app.asar\node_modules@editor\panel\lib\element.ccc:1:4594)
这个是具体的报错消息
现在是只能用任务管理器强制关掉 然后重新打开就行了 这个错误大概每10分钟会出一次 我先在都有点麻痹了
估计是某些组件里需要手动(拖动)添加绑定的节点或预制体没有绑定。某些组件里需要绑定的属性引用,但这些组件是代码里动态添加使用的,那么相应的须绑定属性引用就是默认的空值。比如node+component,component里有需要绑定的prefab,但使用时是在代码里new了一个node,然后add了这个component,那么这个component里引用的prafab就还是个空值,此时如果instantiate这个prefab就是触发一样的报错。The thing you want to instantiate is nil
没有我都绑定了的 如果没绑会一直报错但是我这个报错只要强制关掉cocos再打开就又好了
肯定是哪里预制体是空,断点调试一下就知道啦