// Start is called before the first frame update void Start() { //Mouse events should only interact with robots, not with other elements Physics.queriesHitTriggers = false; if (Levels != null) { Scene scene = SceneManager.GetActiveScene(); int index = Array.IndexOf(Levels, scene.name); if (index >= 0) { // Set up the next level that we'll load into when the user wins if (index == Levels.Length - 1) { // We're on the final level now nextLevel = null; } else { nextLevel = Levels[index + 1]; } } } if (nextLevelButton) { nextLevelButton.gameObject.SetActive(nextLevel != null); } DragSource.EnablePopups(); }