Version: 2017.1

EditorSceneManager

class in UnityEditor.SceneManagement

/

Hereda de:SceneManagement.SceneManager

Cambiar al Manual

Descripción

Scene management in the Editor.

Variables Estáticas

loadedSceneCountThe number of loaded Scenes.
playModeStartSceneLoads this SceneAsset when you start Play Mode.
preventCrossSceneReferencesControls whether cross-Scene references are allowed in the Editor.

Funciones Estáticas

ClosePreviewSceneCloses a preview scene created by NewPreviewScene.
CloseSceneClose the Scene. If removeScene flag is true, the closed Scene will also be removed from EditorSceneManager.
DetectCrossSceneReferencesDetects cross-scene references in a Scene.
EnsureUntitledSceneHasBeenSavedShows a save dialog if an Untitled scene exists in the current scene manager setup.
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.
NewPreviewSceneCreates a new preview scene. Any object added to a preview scene will only be rendered in that scene.
NewSceneCrear una nueva escena.
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.
SaveOpenScenesCrear una nueva escena.
SaveSceneCrear una nueva escena.
SaveScenesSave a list of Scenes.

Events

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.

Delegados

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.

Miembros heredados

Variables Estáticas

sceneCountLa cantidad total de escenas actualmente cargadas.
sceneCountInBuildSettingsCantidad de escenas en los Build Settings.

Funciones Estáticas

CreateSceneCrea una escena nueva vacía en tiempo de ejecución con el nombre dado.
GetActiveSceneObtiene la escena actualmente activa.
GetSceneAtObtiene la escena en el indice en la lista del SceneManager de las escenas agregadas.
GetSceneByBuildIndexObtiene una struct de escena de un indice de construcción.
GetSceneByNameBusca a través de las escenas agregadas al SceneManager para una escena con el nombre dado.
GetSceneByPathBusca todas las escenas agregadas al SceneManager para una escena que tiene la ruta del asset dado.
LoadSceneCarga la escena por us nombre o indice en los Build Settings.
LoadSceneAsyncCarga la escena asincronicamente en el fondo.
MergeScenesEsto fusionará la escena fuente a la destinationScene.
MoveGameObjectToSceneMueve un GameObject de su escena actual a la nueva escena.
SetActiveSceneConfigura la escena para estar activa.
UnloadSceneAsyncDestroys all GameObjects associated with the given scene and removes the scene from the SceneManager.

Events

activeSceneChangedAgrega un delegate a esto para obtener notificaciones cuando la escena activa ha cambiado
sceneLoadedAdd a delegate to this to get notifications when a scene has loaded.
sceneUnloadedAgrega un delegate a esto para obtener notificaciones cuando una escena se ha des-cargado
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961