【Unity】You are trying to replace or create a Prefab from the instance 'XXXX' that references a missing script. This is not allowed.
概要

Saving failed. Check the Console window to get more insight into what needs to be fixed.
プレハブを編集して保存する時に上記のエラーダイアログが表示されて
You are trying to replace or create a Prefab from the instance 'XXXX' that references a missing script. This is not allowed. Please change the script or remove it from the GameObject. UnityEditor.EditorApplication:Internal_CallGlobalEventHandler ()
Console ウィンドウにこのようなエラーメッセージが表示される場合は

プレハブに含まれているゲームオブジェクトに
missing になっているスクリプトがアタッチされている可能性があるため

その missing なスクリプトを Remove Component すれば
プレハブを保存できるようになります