Question by
Dylhutchtwo · Dec 11, 2015 at 03:21 PM ·
respawnreset
Reset Key/Button in unity 5.2?
i am making a simple game for a few friends where you have a bunch of cars and you can crash them into each other but you can get stuck in some places and i was thinking of making a button that would reload the level or move the car to where it started
Comment
Answer by t0xic0m · Dec 12, 2015 at 05:16 AM
Here a Simple function for Restart your Level with Key "R"
void Update ()
{
if (Input.GetKeyDown (KeyCode.R))
{
// Restart Loaded Level
Application.LoadLevel(Application.loadedLevel);`
}
}
Your answer
Follow this Question
Related Questions
Death Countdown Area 0 Answers
Resetting momentum from respawned object? 1 Answer
How Checkpoint works? 1 Answer
Save the Position of Prefab and Respawn it 1 Answer
Dead Body Buildup 2 Answers