I had that issue just a few hours ago. I posted a detailed explaination in the Unity forum.
In short: The problem is that when you assign a prefab to a variable inside that prefab, unity recognise this reference as local reference and adjust it to your real object when it gets instantiated.
That means the variable you assigned your prefab and that you use to Instantiate a new version of your object, is now pointing to the actual object in the scene and not longer to the prefab.
That alone wouldn't be such a big problem because your new object would be cloned from your old object instead from the prefab. But when you call Destroy() on your object all scripts gets disabled before it will be removed. When you instantiate a new object from the old one, all scripts are disabled.
Furthermore it causes another nasty effect. When your object is named "Enemy" the clone will be named "Enemy(clone)". The next instance will be named "Enemy(clone)(clone)". That causes endless names.
That can be avoided by assigning a name after instantiate but it's all not really a good solution.
All in all you will always run into such problems when a prefab is holding a reference to itself. The best solution is to use a prefab manager script that provides easy access to this reference.
Since you didn't specified a language i will use C#:
// This script should be an a empty gameobject somewhere in the scene
// DontDestroyOnLoad would be great (like for the most manager)
public class PrefabManager : MonoBehaviour
// Assign the prefab in the inspector
public GameObject EnemyPrefab;
private static PrefabManager m_Instance = null;
public static PrefabManager Instance
if (m_Instance == null)
m_Instance = (PrefabManager)FindObjectOfType(typeof(PrefabManager));
It's not a perfect singleton, you could check after FindObjectOfType if we found it and in case there is no manager, create one. But it's quite useless because all the prefabs will not be assigned to it and that's the main usage of that manager.
To instantiate a new enemy from inside the enemy script can easily done with:
I'll hope that doesn't confuse you too much :D it's a really tricky problem but i don't see much better solutions. I use such a manager in our game project for nearly everything but watch out: all prefabs assigned to the manager script on the empty gameobject will be packed into the scene where the manager is placed. When you put that manager in the first scene the size of this scene will increase (but the over all size stay the same). It's just a bit nasty when you stream your game in webplayer because it can't start until the first scene is loaded.
If you have more questions on these themes just ask ;)