Unity Switching Screens

In Unity, the "LoadScene()" method is used to switch from one screen (Scene) to another. An example usage is given below.

SceneManager.LoadScene("Play");

In the example, the code to enter the screen named "Play" is written. Which screen you want to switch to should be given as a parameter to the method.

Note : To use the "SceneManager" class, "using UnityEngine.SceneManagement;" should be added.



You May Interest

Checking If Unity GameObject Has Child Object

How to Install Unity UI Toolkit Package ?

Adding a Button Property to an Object in Code in Unity

What is Unity MonoDevelop ?

Unity Visual Studio Debug Problem