Search Unity

All my mesh folder content is gone

Discussion in 'Editor & General Support' started by kaankircali, Apr 30, 2021.

  1. kaankircali

    kaankircali

    Joined:
    Nov 14, 2015
    Posts:
    6
    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?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    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:

    https://forum.unity.com/threads/2-steps-backwards.965048/#post-6282497

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

    https://forum.unity.com/threads/whe...grammer-example-in-text.1048739/#post-6783740

    Share/Sharing source code between projects:

    https://forum.unity.com/threads/your-techniques-to-share-code-between-projects.575959/#post-3835837

    Setting up the right .gitignore file:

    https://forum.unity.com/threads/removing-il2cpp_cache-from-project.1084607/#post-6997067
     
    Joe-Censored likes this.
  3. kaankircali

    kaankircali

    Joined:
    Nov 14, 2015
    Posts:
    6
    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.
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    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! :)
     
    Last edited: Feb 13, 2023
    Liam2349 likes this.
  5. kaankircali

    kaankircali

    Joined:
    Nov 14, 2015
    Posts:
    6
    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" :) Now I am reimporting everything back, and setting up source control.


    Thanks Kurt.
     
    Kurt-Dekker likes this.
  6. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,911
    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.
     
    Joe-Censored and Kurt-Dekker like this.