cocos creator 读取存档后,数据在另外一个脚本怎么使用
建议建立 一个公共数据脚本 window 格式,或者 建立一个常驻节点 使用发送监听事件,再不然就用require 查找
保存到windows.XXXXX里面,或者cc,XXXXX里面都可以,然后再另一个脚本中使用。
或者写个单例,通过require进行使用
我编译打包,cocos直接爆红这个
Error: Compile failed. The log file path [ /Users/zhangdong/.CocosCreator/logs/native.log ]
at ChildProcess.J (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/core/native-utils.js:1:16409)
at ChildProcess.t.on (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/core/native-utils.js:1:6545)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:194:7)
at maybeClose (internal/child_process.js:899:16)
at Socket. (internal/child_process.js:342:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at Pipe._handle.close [as _onclose] (net.js:510:12)