Quantcast
Channel: Cocos中文社区 - 最新主题
Viewing all articles
Browse latest Browse all 88774

龙骨 this.dragonAtlasAsset.init is not a function 浏览器没问题,小游戏报错

$
0
0

@dengzhuanglei 写道:

  • Creator 版本:2.0.1

  • 目标平台: web/微信小游戏

  • 详细报错信息,包含调用堆栈:
    gameThirdScriptError
    this.dragonAtlasAsset.init is not a function;at socketTask.onmessage callback function
    TypeError: this.dragonAtlasAsset.init is not a function
    at Object._parseDragonAtlasAsset (http://127.0.0.1:64597/game/cocos2d-js-min.83b3b.js:1:790950)
    at Object.notify (http://127.0.0.1:64597/game/cocos2d-js-min.83b3b.js:1:787755)
    at Object.t.set as dragonAtlasAsset
    at a._super.setData (http://127.0.0.1:64597/game/src/project.adb02.js:1:229154)
    at a._super.setData (http://127.0.0.1:64597/game/src/project.adb02.js:1:164228)
    at a._super.setBingData (http://127.0.0.1:64597/game/src/project.adb02.js:1:167538)
    at Object.callback (http://127.0.0.1:64597/game/src/project.adb02.js:1:165218)
    at a._super.onMessage (http://127.0.0.1:64597/game/src/project.adb02.js:1:108958)
    at a.super.onMessage (http://127.0.0.1:64597/game/src/project.adb02.js:1:108721)
    at Function. (http://127.0.0.1:64597/game/libs/weapp-adapter/WebSocket.js:60:15)
    console.error @ VM364:1
    errorReport @ WAGame.js:4
    thirdErrorReport @ WAGame.js:4
    (anonymous) @ WAGame.js:4
    a.emit @ WAGame.js:7
    (anonymous) @ WAGame.js:9
    (anonymous) @ WAGame.js:5
    a @ gamePage.html:1
    (anonymous) @ gamePage.html:1
    b.emit @ gamePage.html:1
    v.onmessage @ gamePage.html:1

  • 重现方式:
    预设挂载一个龙骨:
    this.bones.dragonAtlasAsset = cc.xdRes.get('bons/'+troopType+''+lv+'tex');//此方法封装是一个资源池

  • 之前哪个版本是正常的 :

  • 手机型号 :

  • 手机浏览器 :

  • 编辑器操作系统 :

  • 编辑器之前是否有其它报错 :

  • 出现概率:

  • 额外线索:
    源码位置:
    _parseDragonAtlasAsset () {
    if (this.dragonAtlasAsset) {
    this.dragonAtlasAsset.init(this._factory);
    }
    },

帖子: 2

参与者: 1

阅读整个主题


Viewing all articles
Browse latest Browse all 88774

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>