[]微信小游戏默认项目代码添加unity导出.lh文件,微信开发工具提示错误

使用laya生成默认的微信小游戏项目,稍微修改其代码,增加https://github.com/layabox/layaair-doc/tree/master/Chinese/LayaAir_AS3/3D/examples
示例里下载的girl.lh文件,在laya内测试正常加载显示,代码如下:
// 程序入口
class LayaAir3D {
/*3D场景*/
private scene:Laya.Scene;
/*3D角色*/
private role:Laya.Sprite3D;
/*3D摄像机*/
public camera:Laya.Camera;

constructor() {
//初始化微信小游戏
Laya.MiniAdpter.init();
//初始化引擎
Laya3D.init(0, 0, true);

//适配模式
Laya.stage.scaleMode = Laya.Stage.SCALE_FULL;
Laya.stage.screenMode = Laya.Stage.SCREEN_NONE;

//开启统计信息
// Laya.Stat.show();

//添加3D场景
this.scene = Laya.stage.addChild(new Laya.Scene()) as Laya.Scene;

//添加照相机
this.camera = (this.scene.addChild(new Laya.Camera(0, 0.1, 100))) as Laya.Camera;
this.camera.transform.translate(new Laya.Vector3(0, 3, 3));
this.camera.transform.rotate(new Laya.Vector3(-30, 0, 0), true, false);
this.camera.clearColor = null;

//添加方向光
var directionLight: Laya.DirectionLight = this.scene.addChild(new Laya.DirectionLight()) as Laya.DirectionLight;
directionLight.color = new Laya.Vector3(0.6, 0.6, 0.6);
directionLight.direction = new Laya.Vector3(1, -1, 0);

//添加自定义模型
var box: Laya.MeshSprite3D = this.scene.addChild(new Laya.MeshSprite3D(new Laya.BoxMesh(1, 1, 1))) as Laya.MeshSprite3D;
box.transform.rotate(new Laya.Vector3(0, 45, 0), false, false);
var material: Laya.StandardMaterial = new Laya.StandardMaterial();
material.diffuseTexture = Laya.Texture2D.load("res/layabox.png");
box.meshRender.material = material;

//加载3D资源
Laya.loader.create(["res/LayaScene_girl/girl.lh"],Laya.Handler.create(this,this.on3DComplete));
}
/*加载3D资源完成回调*/
private on3DComplete():void{
//创建3D角色
//实例化角色
this.role = Laya.loader.getRes("res/LayaScene_girl/girl.lh");
this.scene.addChild(this.role);
//角色位置
this.role.transform.position = new Laya.Vector3(0,1,2);
}
}
new LayaAir3D();

 
但发布到微信工具运行失败,提示错误如下:
Wechat Lib:1.8.0, 2017.12.22 16:03:55
code.js:104 Warning!,this class[MiniAdpter] already exist: Object
code.js:25623 ShaderCompile use time:5 size:4472/6067
code.js:25623 ShaderCompile use time:3 size:177/148
code.js:92311 Warning: discard property,please use transform's property instead.
code.js:21065 Object
WAGame.js:3 gameThirdScriptError
Sprite3D: The .lh file root type must be Sprite3D,please use other function to load this file.;at api readFile success callback function
[b]Error: Sprite3D: The .lh file root type must be Sprite3D,please use other function to load this file.
at Sprite3D.__proto.onAsynLoaded (http://127.0.0.1:51205/game/code.js:82641:10)
at ResInfo.onLoaded (http://127.0.0.1:51205/game/code.js:12995:61)
at EventHandler.__proto.runWith (http://127.0.0.1:51205/game/code.js:711:59)
at ResInfo.__proto.event (http://127.0.0.1:51205/game/code.js:483:28)
at LoaderManager.__proto._endLoad (http://127.0.0.1:51205/game/code.js:13152:11)
at Loader.onLoaded (http://127.0.0.1:51205/game/code.js:13128:10)
at EventHandler.__proto.runWith (http://127.0.0.1:51205/game/code.js:711:59)
at Loader.__proto.event (http://127.0.0.1:51205/game/code.js:483:28)
at Loader.__proto.endLoad (http://127.0.0.1:51205/game/code.js:12740:8)
at Function.Loader.checkNext (http://127.0.0.1:51205/game/code.js:12769:40)[/b]
console.error
errorReport @ WAGame.js:3
thirdErrorReport @ WAGame.js:3
(anonymous) @ WAGame.js:3
c @ WAGame.js:4
(anonymous) @ WAGame.js:4
function.setTimeout @ gamePage.html:1
(anonymous) @ WAGame.js:3
(anonymous) @ WAGame.js:5
ontimeout @ timers.js:469
tryOnTimeout @ timers.js:304
listOnTimeout @ timers.js:264

另外导入unity的其他导出文件,如为天空盒加载贴图文件也会提示错误。请问是语法错误还是什么问题?还是微信或真机上不支持?
 
QQ20180307-174051@2x.png QQ20180307-174746@2x.png
已邀请:

qian

赞同来自:

下个版本会全面支持3D

banmini

赞同来自:

额,请问现在什么进度了,有预计发布时间吗?

要回复问题请先

商务合作
商务合作