Skip to content

[Enhancement] Check for alternate install path defined in Unity Hub #40

@maximilianmaihoefner

Description

@maximilianmaihoefner

Using Unity Hub it is easy to define an alternate install path for the Unity Editors. After some digging I found that Unity Hub stores that alternate install path in a file called secondaryInstallPath.json. On macOS it is located in ~/Library/Application Support/UnityHub (no clue about Windows or Linux).
The file content, although named .json, is just a string:

"/Applications/CustomUnityDirectory/Editors"

To make it even easier for people to use the Patcher we could read that file and check for Unity Editors in that location in addition to the default one.

Right now the Patcher is quite optimistic when scanning the installation Directory and assumes all sub-directories are Unity Editors, this most likely will break if checking the alternate install paths, since people might just define /Applications or C:\Programm Files.

So the Todos would be:

  1. Figure out where the secondaryInstallPath.json file is located on Windows and Linux.
  2. Add Code to read the file and check that location for Unity Editors.
  3. Add Code to detect if a directory contains an Unity Executable before adding it to the list of possible Editors which could be patched.

Do you have any Feedback on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions