• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 4,102 项符合查询结果, 库内数据总量为 31,625 项。 (搜索耗时: 0.0077 秒)

1911. 请教一个最基本问题: 在项目代码中如何操作场景编辑器中设置的组件? [ 75%]

...用呢?   我已经设置了button的Var 为bt1,在项目代码中写 this.bt1,会提示没有bt1   我在场景编辑器中按f12导出,在项目代码中写 this.bt1,还是会提示没有bt1。我下载了微信飞机ts版本,看了下人家的项目代码里输入this.bg1是完全...

来源: Laya_社区 发布时间: 20191108

1912. [LayaAirIDE3]关于GMovieClip的使用方式 [ 75%]

...不希望他一进入场景就播放,所以我在onAwake里面设置了this.ani1.autoPlay = false ,但设置无效,动画还是进入场景就播放 而后我在动画状态机里面吧Play on Wake取消掉了,动画就不会自动播放了,但是我看了GMovieClip组件文档,没有play...

来源: Laya_社区 发布时间: 20251120

1913. TypeError: Cannot read property 'length' of null [ 75%]

...预制体hero.prefab 在a场景通过Laya.Pool.getItemByCreateFun("hero", this.pHero.create, this.pHero)创建对象,同时给对象设置位置,成功 跳转到b场景后,通过Laya.Pool.getItemByCreateFun("hero", this.pHero.create, this.pHero)获取这个对象时,获取成功,设置对象位...

来源: Laya_社区 发布时间: 20200309

1914. dialog弹窗不居中(laya2.0.0beta5) [ 75%]

...加dialog添加了控制脚本,并在脚本中的onstart函数中添加this.owner.popup(),在laya调试运行显示居中了。但是到微信里面报this.owner.popup undefined错误 2018-12-12 0 3 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被锁定,...

来源: Laya_社区 发布时间: 20181211

1915. laya.d3的SimpleSingletonList 疑似逻辑问题 [ 75%]

...x是-1,SimpleSingletonList的remove会继续进过逻辑:   var end = this.elements[this.length]; this.elements[index] = end; end._setIndexInList(index);   这时候就会把队尾的元素插到下标-1那边。 这样的情况出现第二次以上时,就会把上一次被丢到下标-1的...

来源: Laya_社区 发布时间: 20220707

1916. 自定义shader-简单shader [ 75%]

...rial; var rotation = new Laya.Vector3(0, 0.01, 0); Laya.timer.frameLoop(1, this, function () { layaMonkey.transform.rotate(rotation, false); }); function initShader() { var attributeMap = { 'a_Position': Laya.VertexElementUsage.POSITION0, 'a_Normal': Laya.VertexElementUsage.NORMAL0 }; var uniformMap...

来源: Laya_示例 发布时间: 20251219

1917. 示例打地鼠发布打包后提示TypeError: this.preinitialize is not a function [ 75%]

示例打地鼠发布打包后提示TypeError: this.preinitialize is not a function $ adb shell am start -n "com.layabox.game/demo.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D Waiting for application to come online: com.layabox.game.test | com.layabox.game Conn...

来源: Laya_社区 发布时间: 20171218

1918. 使用二进制图片 · LayaAir3.0文档 · LAYABOX [ 75%]

...", true); xhr.responseType = "arraybuffer"; xhr.onload = function () { if (this.status == 200) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload = function (e) { window.URL.revokeObjectURL(img.src); // 清除释放; }; img.src = window...

来源: Laya3.0_文档 发布时间: 20230303

1919. [LayaAir3]GList点击出现连续点击问题 [ 75%]

...调用这一句,否则显得不正规; 例如在 onAwake 的第一行. this.Gbox_list.setVirtual();   其次对于virtual list, 相当于在复用cell, 逻辑上100行的,实际上是在反反复复就重复用那几个. 因此你 on(xxx....) 这种语法,如果滚动后发生cell复用,相...

来源: Laya_社区 发布时间: 20251021

1920. 图集打包后使用Texture不显示,项目整个已经传上来了 [ 75%]

...andler = Laya.Handler; class GameMain{ constructor() { Laya.init(600,400); this.hahaha(); } private hahaha(): void { var assets: Array<any> = []; assets.push({ url: "res/start.json", type: Loader.ATLAS}); Laya.loader.load(assets, Handler.create(this, this.onComplete)); } private onComplete(): ...

来源: Laya_社区 发布时间: 20170329