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

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

151. 自定义场景继承导出,会在自定义类中加入Laya.前缀导致layaMaxUI文件报错 [ 61%]

...{     prevTasks = ["替换Laya前缀"] }  const fs = require("fs");  function readFile(path) {     if (fs.existsSync(path)) {         return fs.readFileSync(path, "utf-8");     }     return null; } gulp.task('替换Laya前缀', function(){          var layaMaxUI_Pat...

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

152. 微信小游戏分包实战(JavaScript-小游戏适配文档-微信小游戏) [ 61%]

...adSubpackage({ name: 'stage1', // name 可以填 name 或者 root success: function(res) { // 分包加载成功后通过 success 回调 }, fail: function(res) { // 分包加载失败通过 fail 回调 } }) ``` 加载成功的同时,wx.loadSubpackage 会返回一个 [LoadSubpackageTask](https://de...

来源: Laya2.0_文档 发布时间: 20210715

153. 分享:LayaAir下如何获取图集下的小图资源? [ 60%]

...ya.resource.Texture; import laya.utils.Handler; public class Main { public function Main() { //初始化引擎 Laya.init(600, 800); //加载引擎需要的资源 Laya.loader.load([{url:"res/atlas/atlas_res.json",type:Loader.ATLAS}], Handler.create(this, onLoaded)); } private function onLoaded():void...

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

154. Steam扩展实例 · LayaAir3.3 · 引擎文档 · LAYABOX [ 60%]

...p) { ... // 注册Steam初始化函数 jsvm_value fnInitSteam; jsvm_create_function(env, "initializeSteam", SIZE_MAX, jsInitializeSteam, nullptr, &fnInitSteam); jsvm_set_named_property(env, exp, "initializeSteam", fnInitSteam); } } 2.2 生成动态链接库 生成动态链接库与其使用的...

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

155. 用1.01导出的场景加载失败 [ 60%]

... 提示 Sprite3D: the .lh file root type must be Sprite3D,please use other function to load this file.     我的代码  var scene = Laya.Sprite3D.load("unity/LayaScene_1/1.lh");     SceneManager.Instance().AddChild(scene);   2017-05-31 添加评论 免费帖 --> 分享 微博 QZONE 微信 没...

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

156. TileMap有明显的bug [ 60%]

...avascript):var WebGL = laya.webgl.WebGL; Laya.init(1920, 1080, WebGL); function _OnMapCreate() { console.log("map create ..."); } var viewRect = new Laya.Rectangle(0, 0, Laya.stage.width, Laya.stage.height); var tMap = new Laya.TiledMap(); tMap.createMap("res/isometric_grass_and_water.json", vie...

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

157. AS类中初始化JS类相关问题 [ 59%]

...   Laya.loader.load("Base.min.js", Handler.create(this,loadedHandler)); function loadedHandler(data:*):void{ //加载完回调 //__JS__('window.eval(data + "//# sourceURL=" + "Base.min.js")'); //new需要的类   //_base = new Browser.window.Base(); _base = __JS__('new Base');   //执行到这...

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

158. 微信环境下面Laya.Browser.window.protobuf.load不能读取本地的proto文件 [ 59%]

...的protobuf,微信跑不起来啊: protobuf.js中的这句: return Function.apply(null, keys.concat("return " + source)).apply(null, keys.map(function(key) { return scope[key]; })); // eslint-disable-line no-new-func 出来这个错误: WAGame.js:3 gameThirdScriptError Cannot read property '...

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

159. 加载多个protobuf文件报错 [ 59%]

...Parser.ProtoBuf.DotProto.ParserPrototype.parse (protobuf.js:779)     at Function.ProtoBuf.DotProto.Parser.parse (protobuf.js:797)     at Object.ProtoBuf.loadProto (protobuf.js:5102)   应该是没有加载成功     但是加载单个时正常 2016-12-23 添加评论 免费帖 --> 分享 ...

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

160. ls场景文件通过Laya.loader.create()预加载后stage.destroyChildren()出现异常Cannot read property 'visible' of null [ 59%]

... 想做不同场景之间的切换。 spriteBtn.on(Laya.Event.CLICK, this, function (e) { Laya.stage.destroyChildren(); newScene(); });问题:LayaAirUnityPlugin 1.1.0导出了 ls 场景文件,在通过Laya.loader.create()预加载后。在3次Laya.Scene.load()后,最后一次 Laya.stage.destro...

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