Load image from url fail. v3.13

cc.textureCache.addImage(url, function(texture){
	if (texture instanceof cc.Texture2D) {
		this.setTexture(texture);
		this.setTextureRect(cc.rect(0, 0, texture.width, texture.height), false, texture.getContentSize());
	} else {
		console.log("DownloadImage Error");
		console.log(texture);
	}
}, this);

網頁版

我是用這樣的方式來下載圖檔,之前還正常,但升級到3.13以後,url都會載入錯誤,請問有方法可以解嗎

求大神幫解。

請問都沒有人遇到這個問題嗎??

置頂------大神幫解!

置頂…

我也遇到一样的问题,开发团队无人可解吗?

你可以使用downloader 下载后再使用

謝謝你的回覆,但downloader只有在原生上能用 h5上並沒有這個物件,有能同時支援h5與原生的方法嗎