Disconnect Prefab

I have an instance of a prefab in my scene that I want to completely disconnect from the prefab.

'Select' 'Revert' 'Apply' -- where's 'Disconnect'?

Select prefab instance(s), go to GameObject menu → Break Prefab Instance

Break Prefab Connection is a lie, just like the damn cake.

The only way to truly break the connection is to drag the new instance into the Project tab, which will create a totally separate Prefab. Rename the duplicate before you drag it over there. And do this before you make edits to duplicates, or you risk writing changes back to the original via the Apply button.

I found a way to completely disconnect your game object from its prefab. It sounds silly and non conventional, but it works.

Follow these steps.

  1. Create an empty game object in the hierarchy.

  2. Drag the newly created empty game object (EmptyGameObject) into the game object (GameObjectA) which you want to disconnect from it’s prefab. This effectively make the EmptyGameObject the child of GameObjectA.

  3. Create a new prefab in Project tab. It is now an empty prefab. Let’s call it NewPrefab.

  4. Drag GameObjectA into NewPrefab in project tab. GameObjectA is now an instant of NewPrefab.

  5. In the Hierarchy tab, unparent EmptyGameObject from GameObjectA. Do this by dragging EmptyGameObject out of GameObjectA.

  6. You will get a prompting that your action will lose the prefab connection. Click Continue button to continue. GameObjectA is temporarily disconnected from prefab NewPrefab.

  7. Delete NewPrefab from the Project Tab. Once the NewPrefab is deleted. GameObjectA, your game object which is you want to disconnect from its original prefab is permanently disconnected. There is no more association with any prefab.

Good luck to you.

A simple way to disconnect an instance of a prefab from the main prefab, is just to add a component to the instance you want to disconnect. You can remove the component afterwards and it will still be disconnected.

Note though, that if you reconnect the instance to the prefab, it will lose any changes you've made to it that are different to the prefab, ie. components, children etc.

EDIT: Extended answer to cover worries about reconnecting and overwriting changes.

Should you be worried about clicking reconnect and reverting back to the prefab the object was connected to, simply create a new prefab and assign it your changed instance of the object.

You have to instantiate the gameobject.

#if UNITY_EDITOR
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System.Linq;

public static class BreakPrefab
{
	[MenuItem ("GameObject/Disconnect Prefab Instance", false, 0)]
	public static void BREAK ()
	{
		List<GameObject> news = new List<GameObject> ();
		while (Selection.gameObjects.Length > 0) {
			GameObject old = Selection.gameObjects [0];

			string name = old.name;
			int index = old.transform.GetSiblingIndex ();

			GameObject _new = MonoBehaviour.Instantiate (old) as GameObject;
			MonoBehaviour.DestroyImmediate (old);

			_new.name = name;
			_new.transform.SetSiblingIndex (index);
			news.Add (_new);
		}
		Selection.objects = news.ToArray ();
	}
}
#endif

Prefab’s can finally be totally disconnected in 2018.3 via the Editor. It’s called Unpack Prefab. Right click your prefab and select Unpack Prefab or Unpack Prefab Completely. This will completely disconnect the object from its prefab and leave you with plain GameObjects.

Details: