Unity3D (Fatal Error type == kMetaAssetType && pathname.find (“Library/Metadata”) != 0)

The Problem

While attempting to commit some changes to the game today via SVN, I received an error.  When I went to re-open my game project in Unity, I got an error stating:

  • Fatal Error type == kMetaAssetType && pathname.find (“Library/Metadata”) != 0

The Resolution

After searching online, it seemed that most people were having this problem when trying to revert from Unity 4 to Unity 3.  This wasn’t the case for me.  After some time, I discovered that if I moved the Library folder elsewhere temporarily that I was able to launch Unity again.  It then began to do a recompile and rebuilt of the project.  During that, it seemed to get stuck on importing a file (I knew this because there’s no way it should take 5 minutes to import a single material).  So I manually moved that file, and it’s associated meta file, elsewhere and launched Unity again.  It recompiled and rebuilt the project again, which took about 10-15 minutes.  I then copied back my Library folder excluding the Metadata folder, overwriting the newly-created Library folder.

So ultimately my specific problem was caused by some kind of corrupted material file.  I likely could have just removed the file and launched Unity to fix the problem without doing all of the above, however in order to know the file was corrupt I had to do all of that.

 

Posted in Unity 3D, Video Game Development

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>