Complete the code to load a scene named "GameScene" using Unity's SceneManager.
SceneManager.[1]("GameScene");
The LoadScene method loads a scene synchronously by its name.
Complete the code to unload a scene named "MenuScene" asynchronously.
SceneManager.[1]("MenuScene");
The UnloadSceneAsync method unloads a scene asynchronously by its name.
Fix the error in the code to load a scene additively named "Level2".
SceneManager.LoadScene("Level2", [1].Additive);
The LoadSceneMode enum specifies how to load the scene, and Additive loads it without unloading current scenes.
Fill both blanks to load a scene named "BonusLevel" asynchronously and additively.
SceneManager.[1]("BonusLevel", [2].Additive);
LoadSceneAsync loads the scene asynchronously, and LoadSceneMode.Additive loads it additively without unloading other scenes.
Fill all three blanks to unload a scene named "OldScene" asynchronously and check if unloading is done.
AsyncOperation asyncOp = SceneManager.[1]("OldScene"); if (asyncOp.[2]) { Debug.Log("Scene unloaded successfully."); } else { Debug.Log("Scene is still unloading."); } asyncOp.[3] += () => Debug.Log("Unload completed event triggered.");
UnloadSceneAsync starts unloading the scene asynchronously. isDone checks if the operation finished. completed is an event triggered when unloading finishes.