[0]zOrder 修改后无效问题
在游戏启动是先运行代码
Laya.stage.addChild(fgui.GRoot.inst.displayObject)等3d资源加载完成后执行代码
Laya.Scene3D.load("res/LayaScene_View/Conventional/View.ls", Laya.Handler.create(this, (scene) => {
this._scene = scene;
Laya.stage.addChild(scene);
this._scene.zOrder = 0;
}结果结果为3d场景覆盖了UI场景zOrder代码执行无效
试列已上传
Laya.stage.addChild(fgui.GRoot.inst.displayObject)等3d资源加载完成后执行代码
Laya.Scene3D.load("res/LayaScene_View/Conventional/View.ls", Laya.Handler.create(this, (scene) => {
this._scene = scene;
Laya.stage.addChild(scene);
this._scene.zOrder = 0;
}结果结果为3d场景覆盖了UI场景zOrder代码执行无效
试列已上传
没有找到相关结果
已邀请:
要回复问题请先登录
3 个回复
小高
赞同来自:
185*****565
赞同来自:
小高
赞同来自:
也就是说下面这句话设置为0其实是无效的,因为Zorder默认为0,如果想要显示UI场景,可以将Zorder的值改为-1。