- Home /
[Urgent] Bring back a prefab that was accidently changed?
Hello,
Like the title says, is there any way to bring back a prefab from a temporary folder or something that was accidently changed? I accidently put an audio file in the Player's prefab and i clicked 'Change Anyway' and then i lost my player prefab, and the player prefab was very complex. I know this was very stupid... but it's done.
Is there anyway to bring back that prefab? i still haven't closed Unity since that happened, and i hope i don't have to create the prefab from scratch again...
Please respond quickly. Thanks.
Answer by Kryptos · Jun 12, 2012 at 03:49 PM
Not sure, but given the UID, you might be able to find it under Library/Cache.
This is where version control systems are very useful. I strongly recommend to use one even for team with only one person (I know in this case it is not a team).
Agreed, it really sucks it happened. $$anonymous$$ost of us have been there and experienced it given enough time program$$anonymous$$g. This is the learning experience we all go through that $$anonymous$$ches us that source control is not just for $$anonymous$$ms or work... it is invaluable even for hobby development.
SVN and GIT are both free. External source control used to be a nightmare to use with Unity, however the recent change of separating project related settings was night and day with my old $$anonymous$$m.
Like Nicolas said, if there is any hope, you need to dig through the cache before you refresh the project or press play (I advice to turn off auto refresh as well in project settings).
I opened the Editor.Log and i found this:
"Updating Assets/Prefabs/Player.prefab - GUID: 1f0d5ac19d0ffcb4d9481f5e82950762... done."
I searched on the Library/Cache but that file isn't there...
I searched again but in the Library/metadata and found that GUID.
How do i proceed? Is it possible to correct what i did?
I think your course of action should go like this: rebuild your player prefab, because there's actually no way to get it back. Then in future, $$anonymous$$EEP PROPER BAC$$anonymous$$UPS! I cannot stress this enough. $$anonymous$$istakes happen, and there's no way to stop that- so the very least you can do is make it so that they don't matter.