Version: 2019.1

EditorSceneManager

class in UnityEditor.SceneManagement

/

継承:SceneManagement.SceneManager

マニュアルに切り替える

説明

エディターでのシーン管理

Static 変数

loadedSceneCount読み込まれているシーン数
playModeStartSceneLoads this SceneAsset when you start Play Mode.
preventCrossSceneReferences他のシーンを指す参照 (cross-Scene references) がエディターで可能かどうかを制御します。
previewSceneCountThe current amount of active preview Scenes.

Static 関数

ClosePreviewSceneCloses a preview Scene created by NewPreviewScene.
CloseSceneシーンを閉じます。 removeScene フラグが true であれば閉じたシーンは EditorSceneManager から削除されます。
DetectCrossSceneReferencesDetects cross-Scene references in a Scene.
EnsureUntitledSceneHasBeenSavedShows a save dialog if an Untitled Scene exists in the current Scene manager setup.
GetSceneManagerSetupSceneManager の現在の SceneSetUp を返します。
IsPreviewSceneIs the Scene a preview Scene?
IsPreviewSceneObjectIs this object part of a preview Scene?
LoadSceneAsyncInPlayModeThis method allows you to load a Scene during playmode in the editor, without requiring the Scene to be included in the Build Settings Scene list.
LoadSceneInPlayModeThis method allows you to load a Scene during playmode in the editor, without requiring the Scene to be included in the Build Settings Scene list.
MarkAllScenesDirty読み込まれているすべてのシーンを修正済みとして印を付ける。
MarkSceneDirtyシーンを修正済みとして印を付ける
MoveSceneAfter現在ヒエラルキーウィンドウで開いているシーンの順番を入れ替えられます。 ソースシーンは移動先シシーンの後に移動します。
MoveSceneBefore現在ヒエラルキーウィンドウで開いているシーンの順番を入れ替えられます。 ソースシーンは移動先シーンの前に移動します。
NewPreviewSceneCreates a new preview Scene. Any object added to a preview Scene will only be rendered in that Scene.
NewScene新しくシーンを作成します
OpenSceneエディターでシーンを開きます。
RestoreSceneManagerSetupSceneManager の SceneSetup を復元します。
SaveCurrentModifiedScenesIfUserWantsToAsks you if you want to save the modified Scene or Scenes.
SaveModifiedScenesIfUserWantsToAsks whether the modfied input Scenes should be saved.
SaveOpenScenes開いているシーンをすべて保存します。
SaveSceneシーンを保存します。
SaveScenesシーンのリストを保存します。

Events

activeSceneChangedInEditModeSubscribe to this event to get notified when the active Scene has changed in Edit mode in the Editor.
newSceneCreatedThis event is called after a new Scene has been created.
sceneClosedThis event is called after a Scene has been closed in the editor.
sceneClosingThis event is called before closing an open Scene after you have requested that the Scene is closed.
sceneOpenedThis event is called after a Scene has been opened in the editor.
sceneOpeningThis event is called before opening an existing Scene.
sceneSavedThis event is called after a Scene has been saved.
sceneSavingThis event is called before a Scene is saved disk after you have requested the Scene to be saved.

デリゲート

NewSceneCreatedCallbackCallbacks of this type which have been added to the newSceneCreated event are called after a new Scene has been created.
SceneClosedCallbackCallbacks of this type which have been added to the sceneClosed event are called immediately after the Scene has been closed.
SceneClosingCallbackCallbacks of this type which have been added to the sceneClosing event are called just before a Scene is closed.
SceneOpenedCallbackCallbacks of this type which have been added to the sceneOpened event are called after a Scene has been opened.
SceneOpeningCallbackCallbacks of this type which have been added to the sceneOpening event are called just before opening a Scene.
SceneSavedCallbackCallbacks of this type which have been added to the sceneSaved event are called after a Scene has been saved.
SceneSavingCallbackCallbacks of this type which have been added to the sceneSaving event are called just before the Scene is saved.

継承メンバー

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