[]android下layabox调用Laya.Texture2D.load报错

看源码是WebGL.mainContext为空,请问会是配置问题,还是某种支持问题吗?
(PS:: h5浏览器运行是正常的)
 
报错堆栈:
02-06 14:59:43.858  6545  6658 I LayaBox : alert=http://10.0.1.72/game/dev-loca ... 5668: TypeError: Cannot read property 'createTexture' of null
02-06 14:59:43.858  6545  6658 I LayaBox : var glTexture=this._source=gl.createTexture();
02-06 14:59:43.858  6545  6658 I LayaBox :                                ^
02-06 14:59:43.858  6545  6658 I LayaBox : TypeError: Cannot read property 'createTexture' of null
02-06 14:59:43.858  6545  6658 I LayaBox :     at Texture2D.__proto._createWebGlTexture (http://10.0.1.72/game/dev-loca ... 668:32)
02-06 14:59:43.858  6545  6658 I LayaBox :     at Texture2D.__proto.recreateResource (http://10.0.1.72/game/dev-loca ... 5722:8)
02-06 14:59:43.858  6545  6658 I LayaBox :     at Texture2D.__proto.onAsynLoaded (http://10.0.1.72/game/dev-loca ... 5771:8)
02-06 14:59:43.858  6545  6658 I LayaBox :     at ResInfo.onLoaded (http://10.0.1.72/game/dev-loca ... 913:61)
02-06 14:59:43.858  6545  6658 I LayaBox :     at EventHandler.__proto.runWith (http://10.0.1.72/game/dev-loca ... 711:59)
02-06 14:59:43.858  6545  6658 I LayaBox :     at ResInfo.__proto.event (http://10.0.1.72/game/dev-loca ... 483:28)
02-06 14:59:43.858  6545  6658 I LayaBox :     at LoaderManager.__proto._endLoad (http://10.0.1.72/game/dev-loca ... 070:11)
02-06 14:59:43.858  6545  6658 I LayaBox :     at Loader.onLoaded (http://10.0.1.72/game/dev-local/res/libs/laya 

layabox 版本:
02-06 14:56:40.848  6335  6403 I LayaBox :  ======================================================
02-06 14:56:40.849  6335  6403 I LayaBox :               LAYA CONCH
02-06 14:56:40.849  6335  6403 I LayaBox :       runtimeversion:android-conch5-0.9.13
02-06 14:56:40.849  6335  6403 I LayaBox :            jsversion:2.1.3.1
02-06 14:56:40.849  6335  6403 I LayaBox :               isplug:false
02-06 14:56:40.849  6335  6403 I LayaBox :  ======================================================
 
代码调用:
    D3Helper.getMaterialByName = function (name) {

if (undefined == D3Helper.materialDic[name]) {
var material = new Laya.StandardMaterial();
D3Helper.materialDic[name] = material;
[b]var testTexture = Laya.Texture2D.load(name);[/b]
material.diffuseTexture = testTexture;
var transformUV = new Laya.TransformUV();
transformUV.tiling = new Laya.Vector2(2, 1);
// transformUV.offset = new Laya.Vector2(0.1, 0.1);
material.transformUV = transformUV;
}
return D3Helper.materialDic[name];
};

 
已邀请:

Aar0n

赞同来自:

这个现在还不支持,得等年后

gzq892613744

赞同来自:

现在还有这个问题吗 我这边打成apk包 加载3d角色的时候也出现了这个错误 

要回复问题请先

商务合作
商务合作