I am making a 2D Space-invaders style game and am having GREAT difficulty with respawning. What i want to happen is when the SpaceShip is hit, it gets Destroyed, e.x. Destroy();
But when i try to Instantiate() the Prefab of the SpaceShip it does the (clone)(clone) problem, so I am trying to Make an Empty GameObject run script that spawns in a Prefab of the SpaceShip, AND when it gets Destroy(); it respawns after 3 seconds. Much help appreciated, and i'm coding in JavaScript.
Have one class that instantiates every couple of seconds from a prefab. You will need to drag via the Editor the
playerPrefaband you will need to specify the location for the spawn.Then when your
Playerdies you can aSendMessageto theSpawnerclass.Same code in
UnityScriptSpawner.js
Player.js