Create a GameManager script or something along those lines, then create a public static Vector3 and access that variable when you die assigning it the transform.position of the player. Now you just need to access the value of that variable when you restart the level and you should be good to go. Remember to set a default value if you haven't died before.
↧