- Home /
Prefab is not working anymore after opening my project.
Hey everyone :D I ran into a massive problem. I have a prefab that has many scripts and objects in it, it was all working fine until I re-opened unity and the prefab lost EVERYTHING, every script, object .etc It doesn't appear as a prefab in the inspector anymore, it appears as a unknown file of some sort? How do I change/fix/recover it back? Here is the prefab if you want to take a look at it. Thanks!
Answer by IAliHC · Feb 06, 2017 at 08:32 AM
Unity still has this issue so here I am answering this question for those who are facing this. Prefab lost thier state when you open project in older version of unity and in newer again. Solutiuon or workaround is as follows: 1. You must have some script in your hierarchy which links that prefab to scene(afer lost state you can't do this but all previous link will stay valid, if you don't have refrence then move your prefab to resources folder and go to next step) 2. Instentiate your prefab in runtime and copy full gameobject/prefab from scene during runtime 3. Stop the game and paste in hierarchy , you will have your prefab as gameobject there 4. Drag them in project again and you ll have your lost prefab again
Note: you need to renew your links again to new prefab
I just ran into this issue with Unity. $$anonymous$$y laptop crashed and after that my prefabs turned into "empty sheets". So frustrating, so many hours into those prefabs. ._.
Answer by rednax20 · Mar 02, 2013 at 04:47 PM
this happened to me, you are probably in a the wrong project. Projects hold your scripts, not your scenes so opening the scene in the wrong project would give you the scene without scripts. Just press open project and it should get you working again.
Thank you for your reply rednax, but I am in the right project. :( I tried re-opening it multiple times and it still didn't work. Also, before the prefab 'crashed/broke' for some reason it asked me to 'update' the project even know that I DIDN'T update Unity what so ever. All my other projects didn't have this issue either. >.<
Is there any other suggestions or tools I can use to recover it? Thanks!
Answer by Bunny83 · Mar 06, 2013 at 04:45 PM
I'm sorry, but if that's the only version you have of the prefab it's gone forever. I just opened it with a hex viewer and it contains 586752 null bytes. There's no content in it. You can delete this file since it's just a "blank sheet of data"
Thank you for looking at the prefab in your own spare time, That's sad to hear, I had a lot of hours work inside that prefab.:( Do you know the reason/cause for this problem to happen so I can prevent it in the future? thank you again.
I have the same problem with my prefabs. I noticed only the systems components/scripts (graphic raycaster, image, button etc) disappear every time I reopen the project or scene. Not sure why.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Prefab doesn't work when placed in another scene. 0 Answers
The value is not reset for prefab. 2 Answers
GUI Not displaying itselfe in Multiplayer lobby 1 Answer
Pause Menu background problem 0 Answers