welp unity deleted my entire game

amazing product design. had everything neatly in d:\unityhub, apparently this isnt allowed and updating unity deleted everything. searching online revealed a bunch of snobby answers for years of people saying its not unity’s fault. what crap. this is the only program ive ever used in 30 years that didnt at least ask if i wanted to save my data before uninstalling/updating/etc. usually it doesnt have to ask because it would never just randomly delete all of your data in the first place.

It’s not Unity’s fault. Software in general should not share its install directory with its projects.

5 Likes

By default Unity doesn’t save projects to either hub or the editor installation folders. That it was there means that you manually set that folder. This is user error not poor design.

That said even if it were their fault none of this would have been anything more than a minor setback if you had backups. You should never treat your computer or the software running on it as if it were flawless. Just like the previous this is also user error.

1 Like

Not Unity’s fault you were using version control or running backups.

1 Like

This is the third time I see a thread where exactly this happened to somebody. For the sake of the vast amount of different minds and intuitions of people out there, perhaps the Hub should explicitly warn of this or just disallow using its directory as a project destination.

3 Likes

Actually there should probably be a safety check to prevent this from happening. So arguably it is poor design.

No, it’s not poor design. When using computers there is a minimum amount of knowledge you need to keep you and your files safe. The User has been using programs for 30 years and in that 30 years didn’t figure out version control/backups and the do’s and dont’s of using programming software.

You can build the best software on the planet that caters for everyone but there will always be an idiot that fucks it all up.

4 Likes

The poor design on unity side is not user’s lack of version control, but rather the “This program can silently kill contents of this folder with no warning” moment. This is not obvious. Additionally it is incredibly easy to check if the user is trying to create a project within dangerous folder. Or check if the folder being nuked is unity install folder.

So, yes, this is a poor design. And hub does not warn that this folder is unsafe.

This can also result in data loss even when you use version control, but no remote backup.

2 Likes

Yes I agree.
What the OP did is dumb (let them that has never done something dumb throw the first stone) but its an easy check for unity to make, are there things in this dir that shouldnt be there? , though I suppose they will design a better idiot, ‘Hey I’ll rename my project the same as this Unity subdirectory’

I’d recommend voicing the idea here like I did: A new Hub release is available - v3.4
That’s where the hub devs more likely are.

Unity Hub by default wants to install to the Program Files folder. If you let it do that and then tell the hub to use that folder for project storage it will fail to create new projects. To lose a project you would have to override both of the settings (installation folder and project folder) that it defaults to.

8695191--1173342--upload_2022-12-30_17-20-36.png

7 Likes

Actually assuming that the program will be installed into Program Files is a design flaw. A huge one, bigger than not checking if the project folder is within hub folder.

It is not that uncommon to have a smaller SSD for the system files, and bigger storage for everything else, so it would be reasonable to expect unity to be installed outside of the Program Files folder.

The “Failed to create project” message is also not produced by unity, but is a result of trying to write into folder that requires admin privileges while not having them.

Checking for this stuff isn’t as easy as is being suggested. There’s a huge number of edge cases, many of which can happen when Unity isn’t even running.

What if I move a project after it’s created, without any Unity stuff open?

How do you handle the various, potentially changing configurations of stuff which can be part of an Editor install?

All of that can be done, but it’s a lot of effort to support what’s at best a questionable practice anyway.

That said, I do think the good ol’ “This will delete the X folder and all of its contents. Do you wish to continue?” dialog which many uninstallers used to have would be good. That’s pretty trivial, doesn’t get in the way of much, and doesn’t depend on any particular user behaviour.

And it’s not the first time we’ve seen someone make this mistake trying to be “neat”.

That said, for the OP, definitely look into “version control software” such as Git. It’s standard practice for software dev (which is what Unity is) and will get you out of all sorts of trouble as things get increasingly complex, which they will.

4 Likes

You’ll have to open the project at some point.
“Warning: Your project is located within UnityHub folder. You WILL lose all your data during update. Please move it elsewhere”.

Or
“Warning: Unexpected folders found within unity hub folder. The folders will e deleted. Proceed?”

Everyone in UX knows there’s no perfection. But that shouldn’t keep us from reducing the possible pitfalls xP
In German we have a word: DAU: “Dümmster anzunehmener User”. Means “stupidest assumed user” - that’s what you try to proof against.

The larger issue I think is Operating Systems are kind of pushing the file folder paradigm to the side a bit and it’s presented to the users more vaguely than it used to.

And then smartphones and tablets have created a paradigm of never needing to manually save and even less folder management (if at all).

So when all of a sudden a piece of software requires a bit of “old school” manual saving and folder management, there’s quite a bit of a learning curve.

Which is why I think this:

Is a good suggestion. The hub should have safeguards and point users in the right direction and maybe help introduce some basic project management concepts to users (that’s what the hub is supposed to help with, right?).

It’s not about looking down on users and assuming they are stupid, that’s an asshole way of looking at things, it’s about acknowledging that new users exist (and that experienced users sometimes click the wrong thing) and sometimes they need help.

1 Like

No, you don’t. Especially not before an update. Especially especially for people with many projects, or keeping hold of previously released stuff.

All of which is a non-issue with version control in place which, again, is a good actionable next step for the OP to look into.

I will signal boost this thread internally with the hub team.

5 Likes

That’s why you add two sanity checks - in the editor, and in the hub before the update. Where the editor checks project project path when a project is open, and where the hub checks the folder for stray files before killing it.

Additionally version control does not mean remote backup. And to avoid this sort of problem you need remote backup. If you have local git repo sitting within the project folder, it will die along with the project and will be of no help at all.

This is really a bug/oversight and not a “user error”. While the user should know what he/she is doing, a reasonable effort must be made to prevent accidental data loss.

1 Like

Yes, but careful that you need the full package with a remote git repository! Just a local git repository that is placed within the project folder after all and will help you nothing in this case…

1 Like