1569295620用户 版本: 2.3.0.beta.步骤:1.新建2D示例项目2.编辑模式下打开一scene或者prefab.层级面板中右击创建2D/HTMLDivElement3.打开其它scene或者Prefab,再切回来第2步中的Prefab。即可见如图结果。 新手请教,该如何解决该问题?提示中的“手动实例一次本组件可定位错误”中的手动实例如何理解?有劳,多谢!
vvv123 Aar0n 我刚刚更新了引擎后,也出现这个问题,ui里很多地方用到了HtmlText,全部换代码写太麻烦了,我直接找到LayaAirIDE\resources\app\out\vs\layaEditor\renders\editorui2.0这个文件,把__class(HtmlText,'laya.editorUI.HtmlText');这句话改成__class(HtmlText,'laya.editorUI.HtmlText',_super);就没问题了
1569295620用户 忘了吧 代码写。 this.contentDiv = new Laya.HTMLDivElement(); this.contentT.parent.addChild(this.contentDiv); this.contentDiv.x = this.contentT.x; this.contentDiv.y = this.contentT.y; this.contentDiv.width = this.contentT.width; this.contentDiv.height = this.contentT.height; this.contentDiv.style.width = this.contentT.width; this.contentDiv.style.height = this.contentT.height; this.contentDiv.style.fontSize = this.contentT.fontSize; this.contentDiv.style.color = this.contentT.color; this.contentDiv.style.align = "center";