C# 클래스 UnityEngine.SceneManagement.SceneManager

파일 보기 프로젝트 열기: CarlosHBC/UnityDecompiled 1 사용 예제들

공개 메소드들

메소드 설명
CreateScene ( string sceneName ) : Scene

Create an empty new scene at runtime with the given name.

GetActiveScene ( ) : Scene

Gets the currently active scene.

GetSceneAt ( int index ) : Scene

Get the scene at index in the SceneManager's list of added scenes.

GetSceneByBuildIndex ( int buildIndex ) : Scene

Get a scene struct from a build index.

GetSceneByName ( string name ) : Scene

Searches through the scenes added to the SceneManager for a scene with the given name.

GetSceneByPath ( string scenePath ) : Scene

Searches all scenes added to the SceneManager for a scene that has the given asset path.

LoadScene ( int sceneBuildIndex, [ mode ) : void

Loads the scene by its name or index in Build Settings.

LoadScene ( string sceneName, [ mode ) : void

Loads the scene by its name or index in Build Settings.

LoadSceneAsync ( int sceneBuildIndex, [ mode ) : AsyncOperation

Loads the scene asynchronously in the background.

LoadSceneAsync ( string sceneName, [ mode ) : AsyncOperation

Loads the scene asynchronously in the background.

MergeScenes ( Scene sourceScene, Scene destinationScene ) : void

This 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.

MoveGameObjectToScene ( GameObject go, Scene scene ) : void

Move 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 ( Scene scene ) : bool

Set the scene to be active.

UnloadSceneAsync ( Scene scene ) : AsyncOperation

Destroyes all GameObjects associated with the given scene and removes the scene from the SceneManager.

UnloadSceneAsync ( int sceneBuildIndex ) : AsyncOperation

Destroyes all GameObjects associated with the given scene and removes the scene from the SceneManager.

UnloadSceneAsync ( string sceneName ) : AsyncOperation

Destroyes all GameObjects associated with the given scene and removes the scene from the SceneManager.

비공개 메소드들

메소드 설명
GetAllScenes ( ) : UnityEngine.SceneManagement.Scene[]
INTERNAL_CALL_CreateScene ( string sceneName, Scene &value ) : void
INTERNAL_CALL_GetActiveScene ( Scene &value ) : void
INTERNAL_CALL_GetSceneAt ( int index, Scene &value ) : void
INTERNAL_CALL_GetSceneByBuildIndex ( int buildIndex, Scene &value ) : void
INTERNAL_CALL_GetSceneByName ( string name, Scene &value ) : void
INTERNAL_CALL_GetSceneByPath ( string scenePath, Scene &value ) : void
INTERNAL_CALL_MergeScenes ( Scene &sourceScene, Scene &destinationScene ) : void
INTERNAL_CALL_MoveGameObjectToScene ( GameObject go, Scene &scene ) : void
INTERNAL_CALL_SetActiveScene ( Scene &scene ) : bool
Internal_ActiveSceneChanged ( Scene previousActiveScene, Scene newActiveScene ) : void
Internal_SceneLoaded ( Scene scene, LoadSceneMode mode ) : void
Internal_SceneUnloaded ( Scene scene ) : void
LoadScene ( int sceneBuildIndex ) : void
LoadScene ( string sceneName ) : void
LoadSceneAsync ( int sceneBuildIndex ) : AsyncOperation
LoadSceneAsync ( string sceneName ) : AsyncOperation
LoadSceneAsyncNameIndexInternal ( string sceneName, int sceneBuildIndex, bool isAdditive, bool mustCompleteNextFrame ) : AsyncOperation
UnloadScene ( Scene scene ) : bool
UnloadScene ( int sceneBuildIndex ) : bool
UnloadScene ( string sceneName ) : bool
UnloadSceneNameIndexInternal ( string sceneName, int sceneBuildIndex, bool immediately, bool &outSuccess ) : AsyncOperation

메소드 상세

CreateScene() 공개 정적인 메소드

Create an empty new scene at runtime with the given name.

public static CreateScene ( string sceneName ) : Scene
sceneName string The name of the new scene. It cannot be empty or null, or same as the name of the existing scenes.
리턴 Scene

GetActiveScene() 공개 정적인 메소드

Gets the currently active scene.

public static GetActiveScene ( ) : Scene
리턴 Scene

GetSceneAt() 공개 정적인 메소드

Get the scene at index in the SceneManager's list of added scenes.

public static GetSceneAt ( int index ) : Scene
index int Index of the scene to get. Index must be greater than or equal to 0 and less than SceneManager.sceneCount.
리턴 Scene

GetSceneByBuildIndex() 공개 정적인 메소드

Get a scene struct from a build index.

public static GetSceneByBuildIndex ( int buildIndex ) : Scene
buildIndex int Build index as shown in the Build Settings window.
리턴 Scene

GetSceneByName() 공개 정적인 메소드

Searches through the scenes added to the SceneManager for a scene with the given name.

public static GetSceneByName ( string name ) : Scene
name string Name of scene to find.
리턴 Scene

GetSceneByPath() 공개 정적인 메소드

Searches all scenes added to the SceneManager for a scene that has the given asset path.

public static GetSceneByPath ( string scenePath ) : Scene
scenePath string Path of the scene. Should be relative to the project folder. Like: "AssetsMyScenesMyScene.unity".
리턴 Scene

LoadScene() 공개 정적인 메소드

Loads the scene by its name or index in Build Settings.

public static LoadScene ( int sceneBuildIndex, [ mode ) : void
sceneBuildIndex int Index of the scene in the Build Settings to load.
mode [ Allows you to specify whether or not to load the scene additively. /// See SceneManagement.LoadSceneMode for more information about the options.
리턴 void

LoadScene() 공개 정적인 메소드

Loads the scene by its name or index in Build Settings.

public static LoadScene ( string sceneName, [ mode ) : void
sceneName string Name or path of the scene to load.
mode [ Allows you to specify whether or not to load the scene additively. /// See SceneManagement.LoadSceneMode for more information about the options.
리턴 void

LoadSceneAsync() 공개 정적인 메소드

Loads the scene asynchronously in the background.

public static LoadSceneAsync ( int sceneBuildIndex, [ mode ) : AsyncOperation
sceneBuildIndex int Index of the scene in the Build Settings to load.
mode [ If LoadSceneMode.Single then all current scenes will be unloaded before loading.
리턴 UnityEngine.AsyncOperation

LoadSceneAsync() 공개 정적인 메소드

Loads the scene asynchronously in the background.

public static LoadSceneAsync ( string sceneName, [ mode ) : AsyncOperation
sceneName string Name or path of the scene to load.
mode [ If LoadSceneMode.Single then all current scenes will be unloaded before loading.
리턴 UnityEngine.AsyncOperation

MergeScenes() 공개 정적인 메소드

This 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.

public static MergeScenes ( Scene sourceScene, Scene destinationScene ) : void
sourceScene Scene The scene that will be merged into the destination scene.
destinationScene Scene Existing scene to merge the source scene into.
리턴 void

MoveGameObjectToScene() 공개 정적인 메소드

Move 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.

public static MoveGameObjectToScene ( GameObject go, Scene scene ) : void
go UnityEngine.GameObject GameObject to move.
scene Scene Scene to move into.
리턴 void

SetActiveScene() 공개 정적인 메소드

Set the scene to be active.

public static SetActiveScene ( Scene scene ) : bool
scene Scene The scene to be set.
리턴 bool

UnloadSceneAsync() 공개 정적인 메소드

Destroyes all GameObjects associated with the given scene and removes the scene from the SceneManager.

public static UnloadSceneAsync ( Scene scene ) : AsyncOperation
scene Scene Scene to unload.
리턴 UnityEngine.AsyncOperation

UnloadSceneAsync() 공개 정적인 메소드

Destroyes all GameObjects associated with the given scene and removes the scene from the SceneManager.

public static UnloadSceneAsync ( int sceneBuildIndex ) : AsyncOperation
sceneBuildIndex int Index of the scene in BuildSettings.
리턴 UnityEngine.AsyncOperation

UnloadSceneAsync() 공개 정적인 메소드

Destroyes all GameObjects associated with the given scene and removes the scene from the SceneManager.

public static UnloadSceneAsync ( string sceneName ) : AsyncOperation
sceneName string Name or path of the scene to unload.
리턴 UnityEngine.AsyncOperation