Prefabs are displayed on Edit mode and Game view, yet don't exist in Hierarchy

I have discovered a bug that happens when you add a Prefab to the scene. When I tried to add a Prefab to the Scene screen, I got red errors on the console, then that Prefab got stuck in the Scene. I have hidden all objects in the Hierarchy and the sprites still apear in the Scene, even though its “owner” GameObject actuallty doesn’t exist.

And you haven’t read those errors and googled what they mean?

The complete error message contains everything you need to know to fix the error yourself.

The important parts of the error message are:

  • the description of the error itself (google this; you are NEVER the first one!)
  • the file it occurred in (critical!)
  • the line number and character position (the two numbers in parentheses)
  • also possibly useful is the stack trace (all the lines of text in the lower console window)

Always start with the FIRST error in the console window, as sometimes that error causes or compounds some or all of the subsequent errors. Often the error will be immediately prior to the indicated line, so make sure to check there as well.

All of that information is in the actual error message and you must pay attention to it. Learn how to identify it instantly so you don’t have to stop your progress and fiddle around with the forum.

Remember: NOBODY here memorizes error codes. That’s not a thing. The error code is absolutely the least useful part of the error. It serves no purpose at all. Forget the error code. Put it out of your mind.

Showing us the errors would be helpful.

Same thing happened again.


I was editing a script during gameplay. While compiling, Unity “messed up” and 98 warnings saying The referenced script (Unknown) on this Behaviour is missing! appeared.

Sprites of some Prefabs got stuck on both Scene and Game views, as if they somehow “leaked” out of Prefab mode. They’re stuck in all of my scenes!

EDIT: Restarting solved it.