invokinf scene manager uniryty code example
Example 1: load scene unity
using UnityEngine.SceneManagement
public class LoadScene : MonoBehavior
{
public string sceneToLoad = "Level2";
public void Start()
{
SceneManager.LoadScene(sceneToLoad);
}
}
Example 2: change scene unity
SceneManager.LoadScene (sceneBuildIndex:/*Put the number here*/);