You'd have to use a variable that persists through your scene-switch.
Easiest:
Create a static variable e.g.
public class LevelManager {
public static string currentLevel = "MyFirstLevel";
}
and change this variable when the first level is completed:
LevelManager.currentLevel = "MySecondLevel";
Other options would be to create a persisting GameObject, using DontDestroyOnLoad or store that variable permanently (even after the application has closed) using PlayerPrefs.
↧