I call cc.cc.FileUtils.getInstance().addSearchPath(‘xx’). Then I get this error when I try to run the project in web browser.
“Cannot call method ‘getInstance’ of undefined”
Here’s the codes:
cc.game.onStart = function(){
cc.view.setDesignResolutionSize(320, 568, cc.ResolutionPolicy.SHOW_ALL);
cc.view.resizeWithBrowserSize(true);
cc.FileUtils.getInstance().addSearchPath(‘xx’);
//load resources
cc.LoaderScene.preload(g_resources, function () {
var helloWorld = new HelloWorldScene();
cc.director.runScene(helloWorld);
}, this);
};
cc.game.run();