- Home /
Project automatically reimports, changing GUIDs in the meta files.
I am on Unity 5.5.1f1, and I have had this issue intermittently over the last few weeks on various projects.
Basically, what happens is that I'll be working along in Visual Studio (VS2017 with the Unity tools), and I decide to switch back to Unity. And I am greeted by the "hold on" progress bar, and then it starts to reimport everything.
This changes the GUID in every single meta file in my project, resulting in a complete project breakdown.
Here is an example of what my git client shows me for a random file in the project: http://i.imgur.com/xyyAEeb.png
This time around, I thankfully hadn't done a lot of work, and had a git commit from a few minutes back, so hopefully the project is recoverable for me.
If I do not recover the meta files, every GameObject in the scene will obviously lose their links to the various scripts, and this would result in a multi hour job to recover if it wasn't for me using version control.
At any rate, help is appreciated, something is definitely wrong here.
It happened again today. This is the error message I get just before the project starts to reimport the project, regenerating meta files:
http://i.imgur.com/pQRo7zg.png
I press "discard", and suddenly I have changed GUID in the meta files for every file and directory in the project, destroying links in the inspector and generally causing mayhem.
$$anonymous$$y steps to repair: 1. Close Unity as soon as possible - do not save files. 2. Close Visual Studio, do not save. 3. Revert all .meta files using git. Stash any other changes 4. Reload Unity and reload the project. 5. An import of the project will start again. Wait for this to finish. 6. Return to working with your project.
While the steps to repair seem to work - as long as you have a git repo with the metadata files in version control - this is a frustrating process to do repeatedly every so many days.
I had a similar problem recently. It turned out that there were duplicate files with duplicate meta files with duplicate guids in the duplicate meta files. Deleting the duplicates fixed it. It was flagged up as a warning in the console.
Your answer
Follow this Question
Related Questions
When holding down shift cant use the "a" key, an extremely weird bug! 2 Answers
Issue where if I click a button then press W,A,S,D the value of my sliders go down by 10 or up by 10 0 Answers
Why does all my information in Unity dissappear 0 Answers
TextMeshPro Object not updating in real time 0 Answers
Script disables for no reason 1 Answer