Version: 2021.3
Bake data in multiple scenes
场景模板

Use scripts to edit multiple scenes

You can edit multiple scenes using scripts within the Editor or at runtime.

Use scripts within the Editor

When using (or running) scripts within the Editor, use:

  • Scene struct: Available both in the Editor and at runtime, Scene struct contains read-only properties that relate to the scene itself, such as name and asset path.
  • EditorSceneManager API: This class is only available only in the Editor and has several functions to implement all the Multi-Scene editing features described in the pages Setup multiple scenes and Bake data in multiple scenes.
  • SceneSetup utility class: A utility class that you can use to store information about a scene that is in the Hierarchy window.

Use runtime scripts

When using scripts at runtime to edit multiple scenes, use the functions in the SceneManager class such as LoadScene and UnloadScene.

Tips:

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