I never considered myself much of being a designer but I have been having ALOT of fun designing these simple levels. That being said, I do not want my game to go back to the first level. This method may be ok if you have 10 or fewer levels but if I have say 50 levels, I get through 49 and die… GRRRRR. My laptop will be going out the window.
I saw the post about going back 1 level if you die but even that could get very frustrating. Considering there is no current way to save your progress I played around and figured out how to reload the current level if you explode. Instead of Invoke(“LoadFirstLevel”) change it to Invoke(“LoadCurrentLevel”). Then the method would be:
private void LoadCurrentLevel()
{
int currentSceneIndex = SceneManager.GetActiveScene().buildIndex;
SceneManager.LoadScene(currentSceneIndex);
}