Missing Uninstall

Some Installs miss an Uninstall option although it looks like the Uninstaller is present. Any idea why? Using Hub 2.3.2.

e.g.

6019259--648959--upload_2020-6-24_20-41-45.png 6019259--648965--upload_2020-6-24_20-42-39.png6019259--648956--upload_2020-6-24_20-41-38.png
6019259--648962--upload_2020-6-24_20-42-0.png
6019259--648968--upload_2020-6-24_20-42-47.png

here more examples

6019274--648971--upload_2020-6-24_20-46-3.png 6019274--648980--upload_2020-6-24_20-46-55.png6019274--648974--upload_2020-6-24_20-46-13.png6019274--648977--upload_2020-6-24_20-46-23.png 6019274--648983--upload_2020-6-24_20-47-3.png

For some reason only the minority of installs has an Uninstall option but I dont really see a pattern here? Could you explain?

If I remember correctly the Hub only give you an option to uninstall if you installed the said Unity version through Unity Hub. I guess you installed them outside of Hub and added them manually?

Nope havent done that for sure. I might have installed some of them via hub cli - maybe that is the issue here. Maybe someone can verify that

Guten Tag, @marwi

It does look like your installation of Unity 2020.2 is not properly associated with Unity Hub. If you installed it through the Hub, it could be a bug. Can you check if you have a file called editors.json in %APPDATA%\UnityHub ? If yes, does it mention that particular installation of Unity Editor?

Hallo Basil!

Its a long time since I installed an editor without using the hub, so Iā€™m pretty certain 2020.2 was also installed via Hub. Possibly via a CLI command, that Iā€™m not sure of.

This is my editors.json:

{
    "2018.2.14f1": {
        "version": "2018.2.14f1",
        "location": [
            "C:\\Software\\Unity\\Unity 2018.2.14\\Editor\\Unity.exe"
        ],
        "manual": true,
        "buildPlatforms": []
    },
    "2020.1.0b5": {
        "version": "2020.1.0b5",
        "location": [
            "D:\\UnityHub\\2020.1.0b5\\Editor\\Unity.exe"
        ],
        "manual": true,
        "buildPlatforms": [
            {
                "dirName": "windowsstandalonesupport",
                "name": "Windows 64-bit",
                "buildTarget": "StandaloneWindows64"
            }
        ]
    },
    "2017.4.39f1": {
        "version": "2017.4.39f1",
        "location": [
            "D:\\UnityHub\\2017.4.39f1\\Editor\\Unity.exe"
        ],
        "manual": true,
        "buildPlatforms": [
            {
                "dirName": "windowsstandalonesupport",
                "name": "Windows 64-bit",
                "buildTarget": "StandaloneWindows64"
            }
        ]
    },
    "2019.2.21f1": {
        "version": "2019.2.21f1",
        "location": [
            "D:\\UnityHub\\2019.2.21f1\\Editor\\Unity.exe"
        ],
        "manual": true,
        "buildPlatforms": [
            {
                "dirName": "windowsstandalonesupport",
                "name": "Windows 64-bit",
                "buildTarget": "StandaloneWindows64"
            }
        ]
    },
    "2018.4.22f1": {
        "version": "2018.4.22f1",
        "location": [
            "D:\\UnityHub\\2018.4.22f1\\Editor\\Unity.exe"
        ],
        "manual": true,
        "buildPlatforms": [
            {
                "dirName": "windowsstandalonesupport",
                "name": "Windows 64-bit",
                "buildTarget": "StandaloneWindows64"
            }
        ]
    },
    "2020.2.0a9": {
        "version": "2020.2.0a9",
        "location": [
            "D:\\UnityHub\\2020.2.0a9\\Editor\\Unity.exe"
        ],
        "manual": true
    }
}

what does it mean by ā€œmanual: trueā€ ?
The other possibility I see is that I installed via ā€œUnity website ā†’ Open in Hubā€. I surely didnt download and install and then ā€œLocateā€ it. I might have installed ā€œ2018.2.14f1ā€ like that (the editor in ā€œC:\Softwareā€¦ā€).

But even if an editor was installed manually and then added via ā€œLocateā€ - shouldnt be Hub be able to check if there is an Uninstall.exe and if so just display the option to uninstall?

and here is a screenshot of my current installs in hub

"manual: true" means that the Editor was added to the Unity Hub manually. Since you always installed Editors via the Hub, I guess you had these different versions of Unity installed for a while, and the Hub updated a few times since? Itā€™s quite possible that the Hub got confused after an update, and no longer ā€˜remembersā€™ installing these version of Unity Editor!

You can find-and-replace "manual: true" to "manual: false" in that config and restart Unity Hub. That should solve the issue, although itā€™s still puzzling that this happened in the first place.

Incidentally, thanks for being such a devoted Unity user. Thatā€™s a lot of Unity Editors! :slight_smile:

yeah there might have been some hub updatest inbetween. Looks like a bug then.

Yes with manual set to false it shows ā€œUninstallā€. But why is the option hidden for manually added editors?

Btw the path/location used in editors.json is actually my current hub path
6029120--650543--upload_2020-6-27_10-24-59.png

I dont know if it helps for debugging but I think during cli dev I tested setting the hub path to a different directory (via cli), installing an editor and then setting it back to the previous path. Not sure if that could have messed something up here.

The option is hidden for manually-added Editors because Unity can be distributed in many different ways, including just having a zip with the binaries. Uninstall.exe is often not present in those cases, and therefore the Hub has no actual way to remove those Editors.

Thanks for the information, Iā€™ll take a look!

But if the editor is added manually hub could check if a uninstall.exe exists in the added directory? OR when I open the hub wouldnt it even be possible to check if Uninstall.exe exists for all editors?

Thatā€™s a fair point. I will ask the Hub team if this can be implemented.

1 Like

Thank you!

Hi @marwi ,

The reason why this isnā€™t supported is because Windows is the only platform with an uninstaller. The other platforms rely on a folder structure created by the Hub to avoid deleting user files. We can assume the responsibility of deleting our own files but we canā€™t know for sure what is inside a userā€™s manually installed ā€œUnity folderā€. There might be a way to do so safely but since this issue is not blocking anyone we would rather not risk it. Thank you for understanding.

Cheers,

Hello,
does that mean that even on Windows Unity Hub just deletes the whole directory?

No we do call the uninstaller. And once the uninstall is finished we perform extra cleanup (Start menu items. desktop shortcuts etc).

Ok but doesnt that mean that checking if an Uninstall.exe exists and then displaying the option either way (manually or not) shouldnt change much else?

@marwi I understand you really want this and thereā€™s certainly a way we can make it work but we try our best not to have features vary based on the platform. This is our main concern. If we add an option to call the uninstaller from the Hub it will only be on Windows. Plus we might not be able to perform the extra cleanup steps mentioned above. So in conclusion: Yes, but itā€™s still too much of a hack for us to push this feature as is.

Cheers,

Not sure what you mean with ā€œyou might not be able to perform extra cleanupā€ and Iā€™m not sure why itā€™s a hack to add a feature that you otherwise already have (e.g. when installing via hub) - but ok