I would like to change my code to where instead of getting a game over when the ball goes past your paddle instead the level restarts. Does anyone have any ideas on how I can accomplish this?
Hi there! Welcome to the community!
You’ll need the information of the scene you are in, at the end of my comment there’s a solution, if you want to figure it out on your own here’s the pertinent information:
You only need the following line of code, you replace it for the “Game Over” line.
SceneManager.LoadScene(SceneManager.GetActiveScene().name);
This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.