Version: 2020.3

Lightmapping.BakeMultipleScenes

切换到手册
public static void BakeMultipleScenes (string[] paths);

参数

paths 应烘焙场景的路径。

描述

烘焙一组场景。

This loads all Scenes and then builds all lightmaps, Reflection Probes and Enlighten Realtime Global Illumination data. The function automatically splits baked data by Scene. This means you can bake lightmaps for two adjacent levels and have light and shadows cast onto objects in level A affect objects in level B.

Enlighten system data automatically connects neighboring systems when it is additively loaded, thus bounce lighting can flow from one Scene to another.

系统会为所有场景生成单个 LightProbe 资源。因此,目前光照探针总是尽可能多地占用内存,因为所有关卡中的光照探针都一起烘焙。

系统只会针对每个场景烘焙并分配一个环境探针和默认天空探针。

包含各个场景数据的多个光照贴图快照对象会写入“MyScene/LightmapSnapshot.asset”的单个文件中。在编译时,这些数据也会被自动拆分,因此,如果您烘焙多个场景但只部署一个场景,则系统将只部署相应场景的光照贴图数据。