Reputation: 522
I have a character that when it touches another object(lava), it is destroyed. Upon death, there will be a GUI that creates a respawn button, but how do I re-create the player object? I destroyed the object with Destroy(collision.gameObject);
Upvotes: 0
Views: 354
Reputation: 538
The way I would approach your problem would not be to destroy the player when it touches the lava, but rather deactivate the object. Then, when the user clicks the respawn button you would simply activate the object again (but make sure to take him out of the lava first).
This might help for the code-side of things.
Upvotes: 1