get the build index of current open scene unity code example Example: how to get scene index unity SceneManager.GetActiveScene().buildIndex;