Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Bug Missing Uninstall

Discussion in 'Unity Hub' started by marwi, Jun 24, 2020.

  1. marwi

    marwi

    Joined:
    Aug 13, 2014
    Posts:
    104
    Some Installs miss an Uninstall option although it looks like the Uninstaller is present. Any idea why? Using Hub 2.3.2.

    e.g.

    upload_2020-6-24_20-41-45.png upload_2020-6-24_20-42-39.png upload_2020-6-24_20-41-38.png
    upload_2020-6-24_20-42-0.png
    upload_2020-6-24_20-42-47.png
     
  2. marwi

    marwi

    Joined:
    Aug 13, 2014
    Posts:
    104
    here more examples

    upload_2020-6-24_20-46-3.png upload_2020-6-24_20-46-55.png upload_2020-6-24_20-46-13.png upload_2020-6-24_20-46-23.png upload_2020-6-24_20-47-3.png
     
  3. marwi

    marwi

    Joined:
    Aug 13, 2014
    Posts:
    104
    For some reason only the minority of installs has an Uninstall option but I dont really see a pattern here? Could you explain?
     
  4. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    5,457
    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?
     
  5. marwi

    marwi

    Joined:
    Aug 13, 2014
    Posts:
    104
    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
     
  6. BasilUnity

    BasilUnity

    Unity Technologies

    Joined:
    Mar 28, 2018
    Posts:
    93
    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?
     
  7. marwi

    marwi

    Joined:
    Aug 13, 2014
    Posts:
    104
    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:
    Code (JavaScript):
    1. {
    2.     "2018.2.14f1": {
    3.         "version": "2018.2.14f1",
    4.         "location": [
    5.             "C:\\Software\\Unity\\Unity 2018.2.14\\Editor\\Unity.exe"
    6.         ],
    7.         "manual": true,
    8.         "buildPlatforms": []
    9.     },
    10.     "2020.1.0b5": {
    11.         "version": "2020.1.0b5",
    12.         "location": [
    13.             "D:\\UnityHub\\2020.1.0b5\\Editor\\Unity.exe"
    14.         ],
    15.         "manual": true,
    16.         "buildPlatforms": [
    17.             {
    18.                 "dirName": "windowsstandalonesupport",
    19.                 "name": "Windows 64-bit",
    20.                 "buildTarget": "StandaloneWindows64"
    21.             }
    22.         ]
    23.     },
    24.     "2017.4.39f1": {
    25.         "version": "2017.4.39f1",
    26.         "location": [
    27.             "D:\\UnityHub\\2017.4.39f1\\Editor\\Unity.exe"
    28.         ],
    29.         "manual": true,
    30.         "buildPlatforms": [
    31.             {
    32.                 "dirName": "windowsstandalonesupport",
    33.                 "name": "Windows 64-bit",
    34.                 "buildTarget": "StandaloneWindows64"
    35.             }
    36.         ]
    37.     },
    38.     "2019.2.21f1": {
    39.         "version": "2019.2.21f1",
    40.         "location": [
    41.             "D:\\UnityHub\\2019.2.21f1\\Editor\\Unity.exe"
    42.         ],
    43.         "manual": true,
    44.         "buildPlatforms": [
    45.             {
    46.                 "dirName": "windowsstandalonesupport",
    47.                 "name": "Windows 64-bit",
    48.                 "buildTarget": "StandaloneWindows64"
    49.             }
    50.         ]
    51.     },
    52.     "2018.4.22f1": {
    53.         "version": "2018.4.22f1",
    54.         "location": [
    55.             "D:\\UnityHub\\2018.4.22f1\\Editor\\Unity.exe"
    56.         ],
    57.         "manual": true,
    58.         "buildPlatforms": [
    59.             {
    60.                 "dirName": "windowsstandalonesupport",
    61.                 "name": "Windows 64-bit",
    62.                 "buildTarget": "StandaloneWindows64"
    63.             }
    64.         ]
    65.     },
    66.     "2020.2.0a9": {
    67.         "version": "2020.2.0a9",
    68.         "location": [
    69.             "D:\\UnityHub\\2020.2.0a9\\Editor\\Unity.exe"
    70.         ],
    71.         "manual": true
    72.     }
    73. }
    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?
     
    Last edited: Jun 26, 2020
  8. marwi

    marwi

    Joined:
    Aug 13, 2014
    Posts:
    104
    and here is a screenshot of my current installs in hub

    upload_2020-6-26_11-46-25.png
     
  9. BasilUnity

    BasilUnity

    Unity Technologies

    Joined:
    Mar 28, 2018
    Posts:
    93
    "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! :)
     
  10. marwi

    marwi

    Joined:
    Aug 13, 2014
    Posts:
    104
    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
    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.
     
  11. BasilUnity

    BasilUnity

    Unity Technologies

    Joined:
    Mar 28, 2018
    Posts:
    93
    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!
     
  12. marwi

    marwi

    Joined:
    Aug 13, 2014
    Posts:
    104
    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?
     
  13. BasilUnity

    BasilUnity

    Unity Technologies

    Joined:
    Mar 28, 2018
    Posts:
    93
    That's a fair point. I will ask the Hub team if this can be implemented.
     
    marwi likes this.
  14. marwi

    marwi

    Joined:
    Aug 13, 2014
    Posts:
    104
    Thank you!
     
  15. AbrahamDUnity

    AbrahamDUnity

    Unity Technologies

    Joined:
    Jun 28, 2017
    Posts:
    430
    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,
     
  16. marwi

    marwi

    Joined:
    Aug 13, 2014
    Posts:
    104
    Hello,
    does that mean that even on Windows Unity Hub just deletes the whole directory?
     
  17. AbrahamDUnity

    AbrahamDUnity

    Unity Technologies

    Joined:
    Jun 28, 2017
    Posts:
    430
    No we do call the uninstaller. And once the uninstall is finished we perform extra cleanup (Start menu items. desktop shortcuts etc).
     
  18. marwi

    marwi

    Joined:
    Aug 13, 2014
    Posts:
    104
    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?
     
  19. AbrahamDUnity

    AbrahamDUnity

    Unity Technologies

    Joined:
    Jun 28, 2017
    Posts:
    430
    @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,
     
  20. marwi

    marwi

    Joined:
    Aug 13, 2014
    Posts:
    104
    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
     
unityunity