DestroyObject() and load a new object.

I’m trying to remove the object (in this case a cube that attacks me by using)

DestroyObject(enemy)

and this works. But now I try to create a new GameObject that has not been shown in the scene. It has to present the body of the ‘dead’ cube.

I’m just trying things out on cubes etc. until I create some nice models and animate everything.

If possible I’d also like to know how to disable certain scripts. Like I want to disable the EnemyAttack and EnemyAI scripts.

answer in C#

public GameObject PrefabEnemy ;

example (){
PrefabEnemy = Instantiate(PrefabEnemy) as GameObject ; // we create GO and name same object as PrefabEnemy (if it's name is Enemy it'll be enemy(Clone))
}

but you should know that Dead enemy can be same body in animation with gravity on and all physics and all scripts off so he doesn’t move but the mesh works

how to disable Scripts:

this.enabled = false ; // disables your script