Unity Build Automation 光照贴图烘焙
Resolve Unity Build Automation lightmap baking issues and understand common causes and solutions.
阅读时间1 分钟最后更新于 19 天前
症状
- 使用 Unity Build Automation 创建的构建比本地构建明显更暗。
- 使用 Unity Build Automation 构建游戏时,3D 资源显得很暗。
原因
Unity Build Automation 不支持构建光照贴图,如果尝试构建光照贴图,构建出的版本可能会太暗,且构建性能不佳。可能原因有两种:- 您为场景使用了 Precomputed Realtime GI,并且启用了光照贴图的自动构建。
- 您尚未将构建好的贴图签入代码仓库。
解决方案
在场景中关闭 Auto Build(自动构建),然后手动构建并提交光照贴图。根据场景内容和光照设置,您需要提交以下文件:LightingData.assetLightmapSnapshot.assetLightmap-xxx.exrLightprobe-xxx.exr