Unity Hub Update Deleted My Project

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.

2 Likes

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

1 Like

Yes, it’s location was inside the Hub’s folder. So what should I do to prevent this from happening again?

https://discussions.unity.com/t/743254

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.

1 Like

Is there anyway to recover it?

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.

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

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.

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.

2 Likes

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…

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.

1 Like

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.

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 :slight_smile:

The fact that this has not yet been adressed in any way is depressing

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?

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.

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.