C# Class UnityEditor.SceneManagement.EditorSceneManager

Minimal implementation of the EditorSceneManager for older Unity, up to v5.2.
Afficher le fichier Open project: CarlosHBC/UnityDecompiled Class Usage Examples

Méthodes publiques

Méthode Description
CloseScene ( Scene scene, bool removeScene ) : bool

Close the Scene. If removeScene flag is true, the closed Scene is also removed from EditorSceneManager.

DetectCrossSceneReferences ( Scene scene ) : bool

Checks for cross-Scene references in the specified Scene.

MarkSceneDirty ( Scene scene ) : bool

Mark the specified Scene as modified.

MoveSceneAfter ( Scene src, Scene dst ) : void

Allows you to reorder the Scenes currently open in the Hierarchy window. Moves the source Scene so it comes after the destination Scene.

MoveSceneBefore ( Scene src, Scene dst ) : void

Allows you to reorder the Scenes currently open in the Hierarchy window. Moves the source Scene so it comes before the destination Scene.

NewScene ( NewSceneSetup setup, [ mode ) : Scene

Create a new Scene.

OpenScene ( string scenePath, [ mode ) : Scene

Open a Scene in the Editor.

SaveScene ( Scene scene, [ dstScenePath, [ saveAsCopy ) : bool

Save a Scene.

Private Methods

Méthode Description
CreateSceneAsset ( string scenePath, bool createDefaultGameObjects ) : bool
EnsureUntitledSceneHasBeenSaved ( string operation ) : bool
GetSceneByHandle ( int handle ) : Scene
GetSceneManagerSetup ( ) : UnityEditor.SceneManagement.SceneSetup[]
GetTargetSceneForNewGameObjects ( ) : Scene
INTERNAL_CALL_CloseScene ( Scene &scene, bool removeScene ) : bool
INTERNAL_CALL_DetectCrossSceneReferences ( Scene &scene ) : bool
INTERNAL_CALL_GetSceneByHandle ( int handle, Scene &value ) : void
INTERNAL_CALL_GetTargetSceneForNewGameObjects ( Scene &value ) : void
INTERNAL_CALL_MarkSceneDirty ( Scene &scene ) : bool
INTERNAL_CALL_MoveSceneAfter ( Scene &src, Scene &dst ) : void
INTERNAL_CALL_MoveSceneBefore ( Scene &src, Scene &dst ) : void
INTERNAL_CALL_NewScene ( NewSceneSetup setup, NewSceneMode mode, Scene &value ) : void
INTERNAL_CALL_OpenScene ( string scenePath, OpenSceneMode mode, Scene &value ) : void
INTERNAL_CALL_ReloadScene ( Scene &scene ) : bool
INTERNAL_CALL_SaveScene ( Scene &scene, string dstScenePath, bool saveAsCopy ) : bool
INTERNAL_CALL_SaveSceneAs ( Scene &scene ) : bool
Internal_NewSceneWasCreated ( Scene scene, NewSceneMode mode ) : void
Internal_SceneWasOpened ( Scene scene, OpenSceneMode mode ) : void
MarkAllScenesDirty ( ) : void
NewScene ( NewSceneSetup setup ) : Scene
OpenScene ( string scenePath ) : Scene
ReloadScene ( Scene scene ) : bool
RestoreSceneManagerSetup ( SceneSetup value ) : void
SaveCurrentModifiedScenesIfUserWantsTo ( ) : bool
SaveModifiedScenesIfUserWantsTo ( Scene scenes ) : bool
SaveOpenScenes ( ) : bool
SaveScene ( Scene scene ) : bool
SaveScene ( Scene scene, string dstScenePath ) : bool
SaveSceneAs ( Scene scene ) : bool
SaveScenes ( Scene scenes ) : bool
SetTargetSceneForNewGameObjects ( int sceneHandle ) : void

Method Details

CloseScene() public static méthode

Close the Scene. If removeScene flag is true, the closed Scene is also removed from EditorSceneManager.

public static CloseScene ( Scene scene, bool removeScene ) : bool
scene Scene The Scene to be closed/removed.
removeScene bool Bool flag to indicate if the Scene should be removed after closing.
Résultat bool

DetectCrossSceneReferences() public static méthode

Checks for cross-Scene references in the specified Scene.

public static DetectCrossSceneReferences ( Scene scene ) : bool
scene Scene Scene to check for cross-Scene references.
Résultat bool

MarkSceneDirty() public static méthode

Mark the specified Scene as modified.

public static MarkSceneDirty ( Scene scene ) : bool
scene Scene The Scene to be marked as modified.
Résultat bool

MoveSceneAfter() public static méthode

Allows you to reorder the Scenes currently open in the Hierarchy window. Moves the source Scene so it comes after the destination Scene.

public static MoveSceneAfter ( Scene src, Scene dst ) : void
src Scene The Scene to move.
dst Scene The Scene which should come directly before the source Scene in the hierarchy.
Résultat void

MoveSceneBefore() public static méthode

Allows you to reorder the Scenes currently open in the Hierarchy window. Moves the source Scene so it comes before the destination Scene.

public static MoveSceneBefore ( Scene src, Scene dst ) : void
src Scene The Scene to move.
dst Scene The Scene which should come directly after the source Scene in the hierarchy.
Résultat void

NewScene() public static méthode

Create a new Scene.

public static NewScene ( NewSceneSetup setup, [ mode ) : Scene
setup NewSceneSetup Whether the new Scene should use the default set of GameObjects.
mode [ Whether to keep existing Scenes open.
Résultat Scene

OpenScene() public static méthode

Open a Scene in the Editor.

public static OpenScene ( string scenePath, [ mode ) : Scene
scenePath string The path of the Scene. This should be relative to the Project folder; for example, "AssetsMyScenesMyScene.unity".
mode [ Allows you to select how to open the specified Scene, and whether to keep existing Scenes in the Hierarchy. See SceneManagement.OpenSceneMode for more information about the options.
Résultat Scene

SaveScene() public static méthode

Save a Scene.

public static SaveScene ( Scene scene, [ dstScenePath, [ saveAsCopy ) : bool
scene Scene The Scene to be saved.
dstScenePath [ The file path to save the Scene to. If the path is not empty, the current open Scene is overwritten. If it has not yet been saved at all, a save dialog is shown.
saveAsCopy [ If set to true, the Scene is saved without changing the current Scene, and without clearing the unsaved changes marker.
Résultat bool