Version: Unity 6 Beta (6000.0)
LanguageEnglish
  • C#

Lightmapping.BakeMultipleScenes

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static void BakeMultipleScenes(string[] paths);

Parameters

paths The path of the Scenes that should be baked.

Description

Bakes an array of Scenes.

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.

A single LightProbe asset is generated for all Scenes. Hence for the time being, lightprobes always take as much memory as there are lightprobes in all levels that are baked together.

Only one ambient probe & default sky probe will be baked and assigned to each Scene.

Multiple Lightmapsnapshot objects containing the data for each Scene are written into a single file in "MyScene/LightmapSnapshot.asset". At build time this data will also be automatically split as well, hence if you bake multiple Scenes but then only deploy one Scene then only the lightmap data for that Scene will be deployed.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961