UnityEngine.SceneManagement.SceneManager.CreateScene C# (CSharp) Method

CreateScene() public static method

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.
return Scene
        public static Scene CreateScene(string sceneName)
        {
            Scene scene;
            INTERNAL_CALL_CreateScene(sceneName, out scene);
            return scene;
        }

Usage Example

コード例 #1
0
        public static Scene CreateScene(string sceneName)
        {
            CreateSceneParameters parameters = new CreateSceneParameters(LocalPhysicsMode.None);

            return(SceneManager.CreateScene(sceneName, parameters));
        }