Version: 2019.1

SceneManager

class in UnityEngine.SceneManagement

マニュアルに切り替える

説明

実行時のシーン管理

Static 変数

sceneCountThe total number of currently loaded Scenes.
sceneCountInBuildSettingsNumber of Scenes in Build Settings.

Static 関数

CreateSceneCreate an empty new Scene at runtime with the given name.
GetActiveSceneGets the currently active Scene.
GetSceneAtGet the Scene at index in the SceneManager's list of loaded Scenes.
GetSceneByBuildIndexGet a Scene struct from a build index.
GetSceneByNameSearches through the Scenes loaded for a Scene with the given name.
GetSceneByPathSearches all Scenes loaded for a Scene that has the given asset path.
LoadSceneLoads the Scene by its name or index in Build Settings.
LoadSceneAsyncLoads the Scene asynchronously in the background.
MergeScenesThis will merge the source Scene into the destinationScene.
MoveGameObjectToSceneMove a GameObject from its current Scene to a new Scene.
SetActiveSceneSet the Scene to be active.
UnloadSceneAsyncDestroys all GameObjects associated with the given Scene and removes the Scene from the SceneManager.

Events

activeSceneChangedSubscribe to this event to get notified when the active Scene has changed.
sceneLoadedAdd a delegate to this to get notifications when a Scene has loaded.
sceneUnloadedAdd a delegate to this to get notifications when a Scene has unloaded.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961