I accidentally moved my Assets folder, then opened Unity (3). I saw my error and quickly closed Unity, moved the Assets folder back, then reopened Unity. However, it imported the whole project again and straight away everything was screwy... My materials were unlinked to my textures, my scripts were unlinked to my objects, and my prefabs were all unlinked to their instances.
I can relink the textures and scripts, but the prefabs are more difficult. There are a ton of instances of one prefab, and in the Hierachy they are all listed in a pinky colour. I cannot seem to relink them to the prefab, so I can't relink their texture using the prefab.
How do I fix this?
I wrote a script to help with this. It won't fix everything, but at least will reposition things where they were. Hope it helps:
Select the affected objects (you can multi-select), and use this, then choose the original prefab, then hit replace, it will reinstantiate them in place and correctly parented
answered Jan 19 '11 at 05:20 PM
This won't help retroactively, but I have an editor script that lets you do a deep inspection of the scene, with an option to dump to a text file. You should of course back up your scene regularly(!), but if you also dump to text each time you back up, you not only have the backup, you can also figure out what's changed (by dumping the scene again and comparing the output).
You can find the script(s) here.
answered Jan 20 '11 at 07:45 AM