Skip to content

cocos2d-js-v3.13.js:57555 Uncaught TypeError: ccs.dataReaderHelper.addDataFromBinaryCache is not a function #3575

Open
@mblackcat

Description

@mblackcat

When I use ccs.dataReaderHelper.addDataFromFile to read .csb file like below:

ccs.dataReaderHelper.addDataFromFile('res/myui.csb');

I get error:

cocos2d-js-v3.13.js:57555 Uncaught TypeError: ccs.dataReaderHelper.addDataFromBinaryCache is not a function
    at Object.addDataFromFile (cocos2d-js-v3.13.js:57555)
    at Object.cc.game.onStart (test.html?_ijt=hhnmd6tfcppjnmr010d3db9eub:31)
    at Array.<anonymous> (cocos2d-js-v3.13.js:1259)
    at cocos2d-js-v3.13.js:350
    at cc.AsyncPool.self.flow (cocos2d-js-v3.13.js:146)
    at Object.map (cocos2d-js-v3.13.js:197)
    at Object.loadJs (cocos2d-js-v3.13.js:337)
    at Object.loadJsWithImg (cocos2d-js-v3.13.js:347)
    at Object.prepare (cocos2d-js-v3.13.js:1256)
    at cocos2d-js-v3.13.js:1268

I can not find any implementation about the function addDataFromBinaryCache, some one can help me?

else if(str === ".csb")
            ccs.dataReaderHelper.addDataFromBinaryCache(filePath, dataInfo);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions