Search Unity

Unity Hub Update Deleted My Project

Discussion in 'Unity Hub' started by NazGamesOfficial, May 14, 2019.

  1. NazGamesOfficial

    NazGamesOfficial

    Joined:
    Oct 19, 2018
    Posts:
    2
    So I was going to open my UnityHub and it asked for an update. I did and the project I was currently working on got deleted. It did not lose track of it since I can´t find it in my pc. So, is there any way to get it back or should I just start over? Because it's not the first time that this happens but now I was really into the project.
     
    PetrCheez and reachout like this.
  2. DanielTG

    DanielTG

    Joined:
    Feb 15, 2018
    Posts:
    111
    Was your project location inside the Hub installation folder? When the Hub auto-updates it erases and re-installs that folder with the latest Hub release; this has also occurred to users in the past when specifying the Editor install location inside that folder.

    Apologies if that was in fact the case.

    Daniel
     
    Ryiah likes this.
  3. NazGamesOfficial

    NazGamesOfficial

    Joined:
    Oct 19, 2018
    Posts:
    2
    Yes, it's location was inside the Hub's folder. So what should I do to prevent this from happening again?
     
  4. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,147
    Be wary of storing your projects in locations that hold special meaning to the application or the OS. On Windows, for example, the Program Files directories hold special meaning to the OS and should only hold files that the application installed there. The Documents folder is a safer location but I recommend a root folder like C:\Projects.

    For Linux the /home directory is a safe location. I'm not familiar enough with macOS to know a safe folder for it.

    Furthermore I recommend adapting at least one form of project backup. A version control system (like Github or SVN) is the ideal solution as it comes with the ability to look through all of the changes you've made over the life of the project, but at the very least you should have a daily/weekly compressed backup to a safe location like Dropbox. Just don't work on the project directly from Dropbox as it has been known to eat projects actively worked on from there.
     
    Last edited: May 15, 2019
    FortisVenaliter likes this.
  5. Aroueterra

    Aroueterra

    Joined:
    Jan 31, 2018
    Posts:
    1
    Is there anyway to recover it?
     
  6. tng2903

    tng2903

    Joined:
    Apr 8, 2013
    Posts:
    41
    I suppose it's been to late for your case, but in others, there is some hope left, try installing a data recovery software IN ANOTHER PARTITION (or better yet, another hard drive), RIGHT AFTER THE DELETE happen. Then open it up and try to recover your data.
     
  7. reachout

    reachout

    Joined:
    Jan 15, 2021
    Posts:
    10
    What an idiotic design choice from Unity. Not even a warning when you're updating Unity Hub. They couldn't have jjust left user projects alone? Unbelievable
     
  8. Souvlaki42

    Souvlaki42

    Joined:
    Jun 10, 2021
    Posts:
    1
    It just happened to me. I updated Unity Hub for the first time and I got my projects deleted without any kind of warning because I didn't save them outside of Unity Hub's directory. I installed a data recovery software and I hope I can recover them back.
     
  9. carbonlife

    carbonlife

    Joined:
    May 2, 2022
    Posts:
    1
    I'm the latest victim. Unity Hub update sounds so harmless, bye bye projects.... Now I find out this issue has been known for years, so, Unity dev team is at fault for not providing a simple warning " All files in the UnityHub folder will be deleted" seems like a simple thing. And no, no, it's not funny.
     
    Fortimbras and Dkcrow like this.
  10. Fortimbras

    Fortimbras

    Joined:
    May 17, 2022
    Posts:
    1
    It deletes all installed Unity Editors without any warning and for no reason too.
    So I guess you should avoid updating the Hub if you don't have a few hours to waste.

    Just lucky that platforms like steam don't behave the same way...
     
  11. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,147
    Just in case you're not aware the way that Unity treats the folders under Program Files is the way that is intended by the developers of Windows. You're not supposed to store anything but application files under that folder. It's why unless you've disabled warnings you will receive one anytime you do anything by hand in that folder.

    That said most games know this too which is why they store your saved data in either %APPDATA% or somewhere under %USERPROFILE%\Documents.
     
    Last edited: Jul 1, 2022
    FortisVenaliter likes this.
  12. FortisVenaliter

    FortisVenaliter

    Joined:
    Mar 23, 2013
    Posts:
    48
    Also, this is why the Hub defaults to the user's home folder when starting new projects. To end up in that situation, you have to intentionally change that default to put the project in the hub folder... which, why?

    Don't develop in Program Files, folks.
     
  13. BradZoob

    BradZoob

    Joined:
    Feb 12, 2014
    Posts:
    66
    Surely Unity's goals are aligned with the users, why aren't the developers? Just do some basic risk checking of your scripts before committing them and get into reinforcing the culture that it's not the customers fault if it could be easily avoided by your app. If staff are green then make sure you post in the company general boards so some grognards can regale you of the slaughters they've seen at the hands of terribly implemented crons, that should proper get the blood pumpin'. You kids need a lot more fear in your diet :)
     
  14. WhiteAdder

    WhiteAdder

    Joined:
    May 5, 2022
    Posts:
    1
    The fact that this has not yet been adressed in any way is depressing
     
  15. pHghost

    pHghost

    Joined:
    Jan 7, 2018
    Posts:
    61
    The fact that this even happens is depressing...

    Firstly, if you have an important project, how come you aren't backing up? Secondly, who in their right mind places their projects in an application folder?
     
  16. McNugget

    McNugget

    Joined:
    Aug 29, 2022
    Posts:
    1
    Wow, why would a Hub update delete the completely working Unity installation, setup for Android development? To get these things working usually takes about a day with all the debugging and googleing required until it finally deploys.
     
  17. Spudlly

    Spudlly

    Joined:
    Oct 22, 2019
    Posts:
    1
    For projects agreed not sure why you'd store it in program files or push to github or something. However, the more important bit imo is that it deletes already installed Unity editors. Also I just reinstalled a Unity editor after this happened and it doesn't give you the option to place the editor in another location. So I guess you're supposed to move it manually? But if this is how they intend it then at the very least they either need to...
    1. They need to skip deleting the editor repo when installing a new Unity Hub
    2. Group Hub and Editor versions so you have to upgrade both at the same time to upgrade either.