Version: 5.5

EditorSceneManager

class in UnityEditor.SceneManagement

/

다음으로부터 상속:SceneManagement.SceneManager

매뉴얼로 전환

설명

Scene management in the Editor.

정적 변수

loadedSceneCountThe number of loaded Scenes.
preventCrossSceneReferencesControls whether cross-Scene references are allowed in the Editor.

정적 함수

CloseSceneClose the Scene. If removeScene flag is true, the closed Scene is also removed from EditorSceneManager.
DetectCrossSceneReferencesDetects cross-scene references in a Scene.
GetSceneManagerSetupReturns the current setup of the SceneManager.
MarkAllScenesDirtyMark all the loaded Scenes as modified.
MarkSceneDirtyMark the specified Scene as modified.
MoveSceneAfterAllows you to reorder the Scenes currently open in the Hierarchy window. Moves the source Scene so it comes after the destination Scene.
MoveSceneBeforeAllows you to reorder the Scenes currently open in the Hierarchy window. Moves the source Scene so it comes before the destination Scene.
NewSceneCreate a new Scene.
OpenSceneOpen a Scene in the Editor.
RestoreSceneManagerSetupRestore the setup of the SceneManager.
SaveCurrentModifiedScenesIfUserWantsToAsks you if you want to save the modified Scene or Scenes.
SaveModifiedScenesIfUserWantsToAsks whether the modfied input Scenes should be saved.
SaveOpenScenesSave all open Scenes.
SaveSceneSave a Scene.
SaveScenesSave a list of Scenes.

상속된 멤버

정적 변수

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

정적 함수

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 added scenes.
GetSceneByBuildIndexGet a scene struct from a build index.
GetSceneByNameSearches through the scenes added to the SceneManager for a scene with the given name.
GetSceneByPathSearches all scenes added to the SceneManager 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

activeSceneChangedAdd a delegate to this to get notifications 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