Forum Discussion
david.ishii
6 years agoExplorer
Changing Scenes with Unity 2019.3.0.
I have two scenes in my build. Scene 1, menu, and Scene 2, game. I have a simple SceneLoader script on a button in Scene 1 which should link it to Scene 2.
using UnityEngine;
using UnityEngine.SceneManagement;
public class SceneLoader : MonoBehaviour
{ public void LoadScene(int level)
{
SceneManager.LoadScene(level);
}
}
But, whenever I play Scene 1 in the editor, it automatically skips to Scene 2. Does anyone know why this is happening? Or a better way to change scenes?
using UnityEngine;
using UnityEngine.SceneManagement;
public class SceneLoader : MonoBehaviour
{ public void LoadScene(int level)
{
SceneManager.LoadScene(level);
}
}
But, whenever I play Scene 1 in the editor, it automatically skips to Scene 2. Does anyone know why this is happening? Or a better way to change scenes?
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 years ago
- 3 months ago
- 5 years ago
- 3 years ago