Here’s a quick way to respawn in Unity using delegates and events…
In this example, we’re going to use the SpaceBar to initiate the respawn event:

Inside our Main script (attached to the MainCamera), we’ll create the Teleport delegate and give it a Vector 3 value that will be the destination. And also create an event that is tied to the delegate, and make a variable to hold our destination as a Vector 3 value: