微信开发者工具模拟器可以载入,真机载入失败,真机使用的资源是按照文档上传到一个http服务处,并设置了wxDownloader.REMOTE_SERVER_ROOT 。其他资源都没问题,就是TiledMap载入失败。
TiledMap的tmx和png无论是否放在resources下面都一样,测试方法是直接在场景里面创建一个TiledMap对象并关联上tmx。
部分错误log:
gameThirdScriptError
Cannot read property ‘getAttribute’ of undefined;at setTimeout callback function
TypeError: Cannot read property ‘getAttribute’ of undefined
at TheClass.parseXMLFile (https://servicewechat.qq.com/game.js:49701:35)
at TheClass.parseXMLString (https://servicewechat.qq.com/game.js:49895:21)
at TheClass.initWithXML (https://servicewechat.qq.com/game.js:49659:21)
at TheClass.ctor (https://servicewechat.qq.com/game.js:49536:40)
at new TheClass (https://servicewechat.qq.com/game.js:32897:16)
at TheClass.initWithXML (https://servicewechat.qq.com/game.js:48982:23)
at CCClass._applyFile (https://servicewechat.qq.com/game.js:50492:28)
at CCClass._initSgNode (https://servicewechat.qq.com/game.js:50281:14)
at CCClass.__preload