Version: 5.4

SceneManager

class in UnityEngine.SceneManagement

マニュアルに切り替える

説明

実行時のシーン管理

Static 変数

sceneCount現在読み込まれているシーンの合計数が返されます。
sceneCountInBuildSettingsBuild Settings のシーン数。

Static 関数

CreateSceneランタイムに指定した名前で新しい空のシーンを作成します。
GetActiveScene現在アクティブなシーンを取得します。
GetSceneAtSceneManager の追加されたシーンのリストから指定したインデックスのシーンを取得します。
GetSceneByNameSceneManager に追加されているシーンの中から、指定した名前のシーンを検索します。
GetSceneByPathSceneManager に追加されていて、指定したアセットパスを持つすべてのシーンを検索します。
LoadSceneBuild Settings の名前かインデックスでシーンを読み込みます。
LoadSceneAsyncバックグラウンドで非同期的にシーンを読み込みます。
MergeScenesThis will merge the source scene into the destinationScene. This function merges the contents of the source scene into the destination scene, and deletes the source scene. All GameObjects at the root of the source scene are moved to the root of the destination scene. NOTE: This function is destructive: The source scene will be destroyed once the merge has been completed.
MoveGameObjectToSceneMove a GameObject from its current scene to a new Scene. You can only move root GameObjects from one Scene to another. This means the GameObject to move must not be a child of any other GameObject in its Scene.
SetActiveSceneシーンをアクティブにします。
UnloadSceneSceneManager で、指定したシーンに関連するすべてのゲームオブジェクトを解放します。

Events

SceneManagement.SceneManagerシーンが読み込まれた際の通知を受け取るデリゲートを追加します。
SceneManagement.SceneManagerシーンが解放された際の通知を受け取るデリゲートを追加します。
SceneManagement.SceneManagerアクティブなシーンが変更されたとき、通知を受け取るデリゲートを追加します。
activeSceneChangedアクティブなシーンが変更されたとき、通知を受け取るデリゲートを追加します。
sceneLoadedシーンが読み込まれた際の通知を受け取るデリゲートを追加します。
sceneUnloadedシーンが解放された際の通知を受け取るデリゲートを追加します。
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961