Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to load a scene named "GameScene".
Unity
SceneManager.[1]("GameScene");
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using UnloadScene instead of LoadScene.
Trying to create a scene with CreateScene which is not for loading.
Using ActivateScene which is not a SceneManager method.
✗ Incorrect
The LoadScene method loads the specified scene by name.
2fill in blank
mediumComplete the code to unload a scene by its name "MenuScene".
Unity
SceneManager.[1]("MenuScene");
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using LoadScene instead of unloading.
Using UnloadScene, which does not exist.
Using ActivateScene which is unrelated.
✗ Incorrect
The UnloadSceneAsync method unloads a scene asynchronously by name.
3fill in blank
hardFix the error in the code to add a new scene called "Level2" additively.
Unity
SceneManager.[1]("Level2", LoadSceneMode.Additive);
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using LoadScene instead of LoadSceneAsync.
Using CreateScene which creates a new empty scene, not loading.
Using UnloadScene which removes scenes.
✗ Incorrect
To load a scene additively, use LoadSceneAsync with LoadSceneMode.Additive.
4fill in blank
hardFill both blanks to check if a scene named "Tutorial" is loaded.
Unity
Scene scene = SceneManager.[1]("Tutorial"); bool isLoaded = scene.[2];
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using GetSceneAt which gets scene by index, not name.
Checking isActive instead of isLoaded.
Mixing up method and property names.
✗ Incorrect
GetSceneByName gets the scene object by name, and isLoaded checks if it is loaded.
5fill in blank
hardFill all three blanks to create a new empty scene and set it as active.
Unity
Scene newScene = SceneManager.[1]("NewScene"); SceneManager.[2](newScene); bool activeCheck = SceneManager.[3]().name == "NewScene";
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using LoadScene instead of CreateScene for new empty scene.
Not setting the new scene active.
Using GetSceneByName instead of GetActiveScene.
✗ Incorrect
CreateScene makes a new empty scene, SetActiveScene sets it active, and GetActiveScene returns the current active scene.