Dienstag, 11. Februar 2020

Unity 3d - change scence how to

C#: how to switch to another scene in Unity 3d

using UnityEngine.SceneManagement;
..
SceneManager.LoadScene("myNextScene");

get current scene name:

Debug.Log(SceneManager.GetActiveScene().name.ToString());

get Scene:

private Scene view;
...
this.view = SceneManager.GetActiveScene();

0 Kommentare:

Kommentar posten

Abonnieren Kommentare zum Post [Atom]

<< Startseite