mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
fix texture url on native
This commit is contained in:
@@ -82,6 +82,7 @@ function loadImage (item, callback) {
|
||||
else if (url.match(jsb.urlRegExp)) {
|
||||
jsb.loadRemoteImg(url, function(succeed, tex) {
|
||||
if (succeed) {
|
||||
tex.url = url;
|
||||
callback && callback(null, tex);
|
||||
}
|
||||
else {
|
||||
@@ -92,6 +93,7 @@ function loadImage (item, callback) {
|
||||
else {
|
||||
var addImageCallback = function (tex) {
|
||||
if (tex instanceof cc.Texture2D) {
|
||||
tex.url = url;
|
||||
callback && callback(null, tex);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user