unity how to destroy and respawn object code example
Example 1: destroy gameobject unity
Destroy(this.gameObject);
Example 2: unity clone don't destroy on scene load
private static Player playerInstance;
void Awake(){
DontDestroyOnLoad (this);
if (playerInstance == null) {
playerInstance = this;
}
else {
DestroyObject(gameObject);
}
}