大约有 4 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0026 秒)
... constructor() { super(); } onStart(): void { //加载预制体文件 Laya.loader.load("resources/Title.lh").then( (res)=>{ //创建预制体 let label: Laya.Label = res.create(); //添加预制体Label字体到box节点下 this.box.addChild( label ); } ); } } 运行效果如图3-6所示 (图3-...
来源: Laya3.0_文档 发布时间: 20241014
...使用的方式为: let myI18n: Laya.Translations; myI18n = await Laya.loader.load("editorResources/i18nSettings.i18ns"); console.log(myI18n.t("a")); 在很多情况下,如果只是代码里用到的一些小量国际化的支持,并不想创建多个json文件,那么也有全代码的方法...
来源: Laya3.0_文档 发布时间: 20251010
... constructor() { super(); } onStart(): void { //加载预制体文件 Laya.loader.load("resources/Title.lh").then( (res)=>{ //创建预制体 let label: Laya.Label = res.create(); //添加预制体Label字体到box节点下 this.box.addChild( label ); } ); } } 运行效果如图3-6所示 (图3-...
来源: Laya3.0_文档 发布时间: 20251105
...内容并返回。如果不需要支持热重载,则忽略。 @Laya.regLoader(["abc"], null, true) export class DemoAssetLoader implements Laya.IResourceLoader { async load(task: Laya.ILoadTask): Promise<any> { let json = await task.loader.fetch(task.url, "json"); let res = task.obsoluteInst...
来源: Laya3.0_文档 发布时间: 20251010