All my mesh folder content is gone

After working 2 weeks, Unity suddenly deleted my mesh folder and its content then create a emtpy folder. It just gives an error that some items need to deleted from dll kind of message and all meshes deleted where I was not even deleting a mesh! I was just deleting prefab!

All my work is gone? How I can get back those meshes?

Check your recycled bin and see if anything is retrievable.

I’m sorry you’ve had this issue. Please consider using source control in order to guard and protect your hard-earned work.

Personally I use git because it is free and there are tons of tutorials out there to help you set it up.

Here’s how I use git in one of my games, Jetpack Kurt:

Using fine-grained source control as you work to refine your engineering:

Share/Sharing source code between projects:

Setting up the right .gitignore file:

1 Like

Hi Kurt,

Thanks for the advice, usually I do it manually by copying the content of critical files. But to be honest never thought it will happen to mesh files. I have project files from Blender but in any case it is frustrating.

I will check your workaround.

There are no “mesh files” from a standard Blender import. Unity imports a Blender file as a series of different assets depending on what you put into it in the first place: GameObject, MeshRenderers, Meshes, Materials, etc.

All Unity does when it imports a blender file is call the Unity-BlenderToFBX.py script (located in your installation of Unity) and imports stuff.

If you recently upgraded Unity, around Unity2019 or so, they changed what they imported, so it will reshape EVERYTHING in your imports and break 100% of your prefabs if you have extra things like Camera and Light in your blender files.

Is that what happened?

If so, you can easily tweak the import script back to the way it was before, changing the one that Unity installs. You’d need to sort out any permissions to edit the file with your operating system.

There is a line in the above python file enumerating what will get imported. Make that line look like this:

exportObjects = ['ARMATURE', 'EMPTY', 'MESH']

Then reimport all and it should be back to the way it was before the upgrade.

ALSO: USE SOURCE CONTROL! :slight_smile:

1 Like

Actually I am doing it through fbx export not blender file. It is much more easier for me to share files thorugh various applications.

I closed the project after I went mad. Now I reopened it and understand not only “Meshes” folder, also “Materials” folder and unfortunateley “Editor” folder with my editor scripts are gone.

And I just tried to delete a prefab and all this happened. Try to recover but no chance.

Anyway as you said key is “SOURCE CONTROL” :slight_smile: Now I am reimporting everything back, and setting up source control.

Thanks Kurt.

1 Like

100% on the source control front!

That being said double check that you haven’t simply accidentally dragged these folders/files inside another folder. I’ve done that many a time and it can be quite annoying and frustrating to repair.

2 Likes