Quantcast
Channel: Questions in topic: "side-scrolling"
Viewing all articles
Browse latest Browse all 99

How to make one restart screen for an entire game

$
0
0
I have a separate restart screen with a restart button and a quit button, I want to make it so that the restart button just reloads the last played level and I want to be able to do this for every level of the game I've tried this code but it did not work public class Restart : MonoBehaviour { void OnMouseDown() { Application.LoadLevel(Application.loadedLevel); } } I am pretty sure this does not work because when the player dies it opens up a new scene (the restart scene) and the loadedlevel just reloads the restart scene, so how would i reload the previous scene?

Viewing all articles
Browse latest Browse all 99

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>