- Home /
Missing Prefab
Hey All!! I had a Particle system as a game object in my scene. I was just testing with my project so I just dragged it from the heirarchy view to a prefab inside project tab. After that I deleted this prefab. Now the game object still exists inside the hierarchy tab and also it works well, but its color has been changed to red and it shows the text missing written on it inside inspector. My question is what's the problem that its color has been changed and the text missing has appeared while it is still working OK? Will it create a bug in my game later on? If that can happen, kindly suggest me a solution, so that I can resolve the matter without making the effort of recreating the prefab as it is a tedious job.
Thanks in Advance!!
@dashing-buddy: Don't post such information as answer. Edit your question to add more information to your question or post a comment. Answers should answer the question.
I've converted your answer into a comment.
No worries, your game will be fine, your instance in your scene hierarchy is fully intact. It's just that the Unity Editor lost the information about the actual Prefab, which was deleted. This changes the color, and the Inspector buttons that usually influence the Prefab are replaced by the Word "$$anonymous$$issing".
Answer by Bunny83 · Jul 03, 2012 at 11:20 AM
Just select your GameObject with the missing prefab connection and click GameObject --> "Break Prefab Instance" to remove the connection.
Then re-import the prefab to your scene, right?
If so, then it does not solve the issue but a guide to making it work again if I understand correctly. Right?
Answer by CollosalChris · Apr 30, 2016 at 11:35 AM
For anyone getting this error after recreating a project from a git repository - make sure the repo has all its .meta files checked in or prefab references can be lost. Contact the creator of the project (or tap yourself on the shoulder if you did it) and tell them to check everything into the repo, then resync your project and watch the errors fade away! Otherwise see the other answers.
Answer by jamesnw · Jun 25, 2018 at 10:05 PM
Note: I also had this issue (pulling from my Git repo), but ALL my .meta files existed. The issue was that unity re-imports the 3rd-party assets (perhaps to rebuild the 'Library' folder), and I must have forgotten to create a local prefab (and disconnect from the one in a 3rd-party asset). I think reimporting the libraries/packages breaks it. The solution for me (the first part stated in another answer) was to use 'GameObject->Break Prefab Instance' (I did this just to be sure), then drag-n-drop to create a new local prefab in my project. After re-syncing on the target machine, all was good. ;)