当前位置:网站首页>unity 自定义webgl打包模板
unity 自定义webgl打包模板
2022-07-06 18:43:00 【吴梓穆】
对于webgl项目,我们经常需要修改index.html里的内容,但是每次打包,都会覆盖上次的内容,如果每次都要额外保存一份index.html或者css文件的内容再替换掉打包的内容,会浪费很多时间,好在Untiy允许我们自定义打包的模板
我们需要在Assets里创建一个文件夹名字叫 WebGLTemplates,这里用来存放所有的模板,然后在WebGLTemplates下再建一个文件夹,名字为我们模板的名字,然后在这个文件里放入我们的模板资源,例如
这里,我们创建了一个名为TestTemplates的模板
其中放了我们需要的模板资源和Index.html文件
注意:如果你使用了自己修改的untiy提供的打包模板,务必把打出的包里的TemplateData放到你的自定义模板文件夹里,正如我图片里展示的一样
设置好模板后,在ProjectSettings/Player里的h5/Resolution and Presentation里选择使用我们的自定义模板即可
边栏推荐
- 【论文阅读|深读】ANRL: Attributed Network Representation Learning via Deep Neural Networks
- Sensor: DS1302 clock chip and driver code
- Why am I warned that the 'CMAKE_ TOOLCHAIN_ FILE' variable is not used by the project?
- 建議收藏!!Flutter狀態管理插件哪家强?請看島上碼農的排行榜!
- 人脸识别应用解析
- 解密函数计算异步任务能力之「任务的状态及生命周期管理」
- 张平安:加快云上数字创新,共建产业智慧生态
- 阿里云中间件开源往事
- go swagger使用
- 3D激光SLAM:Livox激光雷达硬件时间同步
猜你喜欢

Flir Blackfly S 工业相机:配置多个摄像头进行同步拍摄

Zhang Ping'an: accelerate cloud digital innovation and jointly build an industrial smart ecosystem

String or binary data will be truncated

FLIR blackfly s industrial camera: synchronous shooting of multiple cameras through external trigger

Web3的先锋兵:虚拟人

【森城市】GIS数据漫谈(二)

postgresql之integerset

3--新唐nuc980 kernel支持jffs2, Jffs2文件系统制作, 内核挂载jffs2, uboot网口设置,uboot支持tftp

Time synchronization of livox lidar hardware -- PPS method

Detailed explanation of line segment tree (including tested code implementation)
随机推荐
企业中台建设新路径——低代码平台
Recent applet development records
Twenty or thirty thousand a leaf? "Yang Mou" behind the explosion of plant consumption
C#/VB.NET 删除Word文档中的水印
Processus général de requête pour PostgreSQL
FLIR blackfly s usb3 industrial camera: white balance setting method
红外相机:巨哥红外MAG32产品介绍
The boss is quarantined
1500万员工轻松管理,云原生数据库GaussDB让HR办公更高效
Integerset of PostgreSQL
Stm32f4 --- PWM output
Sensor: DS1302 clock chip and driver code
New generation cloud native message queue (I)
Lidar: introduction and usage of ouster OS
The last line of defense of cloud primary mixing department: node waterline design
Detailed explanation of line segment tree (including tested code implementation)
Draco - glTF模型压缩利器
How to build a 32core raspberry pie cluster from 0 to 1
Introduction to RC oscillator and crystal oscillator
Several classes and functions that must be clarified when using Ceres to slam