Open m-ronchi opened 6 years ago
u3d deals with existing Unity folders by asking you if you want to rename them. At least that's the intended behavior. If you later uninstalls it, it uninstalls the version.
It didn't take into account that Unity would reuse the folder to place the Hub, which I personally haven't used given that we don't have a need for it yet.
It looks a bit weird that Unity decided to put the Hub inside a folder that people have been used of messing around with (moving, deleting) for years, instead of something new, like /Applications/UnityHub.
I would have to look at the Hub a bit before fixing this. From your description, we could start by adding a check to uninstall and sanitize if any if the moved folders contains the Hub.
And sorry about the issues created by u3d :(
I also posted on Unity forum about this: https://forum.unity.com/threads/recover-from-nuked-install-folder.534684/
this is what /Applications/Unity folder looks like when managed by the hub. maybe u3d doesn't recognize it cause it's "empty" (except Hub subfolder):
As a work around for @m-ronchi I believe that you can manually set the path of where the Unity-Hub looks for and installs your unity versions.
I could be wrong though.
Finally, keep in mind that the Hub is a Beta product with it's own issues: https://forum.unity.com/forums/unity-hub-preview.142/
Issue Checklist
u3d --help
Issue Description
[DESCRIBE YOUR ISSUE HERE]
Hi, I recently had to install 5.2.3 (GDPR on old project) that is not supported by Unity Hub, so I used this tool.
problem is, Hub defaults the installs to
/Applications/Unity/Hub/Editor/<version>
, so u3d moved everything together to its location alongside the installed version.to make things worse, I actually mistyped, so I installed 5.3.2, uninstalled it, and installed the correct version. the uninstall step nuked all my hub installs.
you should put some safeguards to prevent deletion/unexpected move of existing stuff (e.g. abort the install if
/Applications/Unity/
already exists and is not empty, or temporarily move it to a backup location before the install)