The file MemoryStream is corrupted! Remove it and launch unity again

Hi,

Ive updated Unity from 5.2 to 5.3.1f1 yesterday and was using it with no problem then saved my scene and project and now have just opened the project again and when I went to play it I got the following error …

The file MemoryStream is corrupted! Remove it and launch unity again

How can I correct this please ?

Thanks.

This is the solution - it involves Unity’s remote:

Set Editor->UnityRemote->Device->None->Exit Unity (To save this config)->reopen->play
Once it plays successfully, you can reset the Unity Remote to the device you were using previously.

@Unity, when can we expect a patch for this?

For me, it turned out that the issue was that I had Android selected under Build Settings, but had an iPhone connected via UnityRemote.

remove folder /ProjectName/Library/metadata then restart unity

Prefab is broken. Reset it or Use the older one. It will solve the problem.

Pinned down the problem to a corrupted prefab instance (thanks @unity_6_EkiNr9Kjm8VQ for the hint!). Here is how I solved it:

  1. If you can’t run the editor, delete the project’s Library folder first.
  2. Run Unity. It will start in a Sample Scene now. [Optional: Play the scene for a few seconds].
  3. Open your scenes one by one. The one with the problem will crash the editor.
  4. Copy all the files of all the
    prefabs used in this scene to a safe
    folder.
  5. Run the editor again, and delete all
    the prefabs from Unity.
  6. The scene should load now.
  7. Delete all the instances of the
    prefabs from the scene hierarchy.
  8. Save your scene.
  9. Drag and drop the prefabs again
    (from the folder you copied them to
    earlier) into Unity.
  10. Recreate the instances.

I know this might be an old thread, but I just ran into this problem. I am using Unity 5.6.
I had exported some prefabs and moved them to a new project.
Some of the scripts I did not copy over. (So there were unassigned.)
I created a new scene and put the old prefab into it, I added some links and then hit apply to save the prefab, then that is when I got the error.
After some messing around and removing the scripts that were not there, I then dragged the prefab into the Project to make a new one. That seems to fix the issue.
There seems to be an error on the old prefab with the unassigned links.
After you save the new prefab, the old one seems to be ok.
Not having the error anymore.

TLDR, if you have some unassigned scripts on your prefab, remove them, then save it as a new prefab.