Hello!
The Unity Hub uses a file with some meta data in it that tracks which modules you have installed. If the file is not present, the Add Modules option isn’t present in the Hub for that Editor.
We recommend always installing the Editor via the Hub, so that this is generated and the state of your editor and modules can be maintained.
If you go to an Editor installed with the Hub, right click the editor item, or click the cog for that editor, then go to Reveal in <Finder|Explorer>, you’ll see a file called modules.json. That’s the one we use.
The status of module installation is held there. If you non-Hub install an editor that you are sure does not have any modules installed along with it, it may be possible to add this file yourself.
I want to impress however that doing so is at your own risk. This is only a means to get unstuck if you are in the specific scenario where you have a non-Hub installed editor that you know has no modules installed with it already. If you are already here looking for a work around.
If you have any trouble getting the following to work, please simply delete that modules.json file to restore the status of the installation.
Steps for creating the modules.json file – again, at your own risk:
- Open the folder with the Unity editor you want to perform this on. You can get to this from within the Hub: right click or click the cog, then go to Reveal in <Finder|Explorer>.
- In the folder that is now open, you should see a small list of files, including Unity and Unity Bug Reporter (what you see will depend on your OS.)
- Create a new file called
modules.json. Be very specific about the name and capitalization. Also note that some OSes hide extensions by default, so even though you put.jsonat the end, it might not actually be a.jsonfile. It may be.json.txtwith the.txthidden. Make sure that this file is a json file, and not a text file or something else. - Open the
modules.jsonfile. Use any text editor (notepad, textedit, vscode, notepad++, or any you like.) - Inside the
modules.jsonfile, put this exact thing:[{}]. This is a json format for an empty object in an array of objects. It’s okay if you have a return/newline after this, so long as exactly that is inside themodules.jsonfile. - Save and close that file.
- Fully quit and restart the Hub. Make sure that the Hub is not running in the system tray still.
Now when you re-load the Hub, the editor we did this for should have the “Add Modules” button.
Again, please keep in mind that this makes it so that the Hub assumes the editor we did this to has no modules at all. If you have modules installed and try to do this, the Hub may have trouble installing things or uninstalling things. Please do this only at your own risk.
Hopefully this helps the select few who need a work around here. Remember, the easiest way to manage this is to install the Unity Editor through the Hub itself. You can go to the Unity Download Archive if you need a specific version of the editor, or install a specific version for your project directly.
All the best, Creators!