Introduction
I’m trying to automate installing Unity on our own build server (we can’t use Unity cloud build). The idea is as follows:
- User kicks of a build
- Build script starts on build server
- Unity build server opens projectverison.txt
- PowerShell script starts and uses Unity Hub CLI to check if this specific version of Unity is already installed
- If not it installs it using Unity Hub CLI
- Unity build continues…
However this fails on step 5 as the modules you can install through the UI don’t match the modules you can install through the CLI.
Installing Unity 2019.2.12f1
For example, if we look at 2019.2.12f1 we can see that they list in the UI doesn’t match the CLI list:
(I couldn’t find a match for the Red Lines)
Also, if I then install it using this command:
'unity hub.exe' -- --headless install --version "2019.2.12f1" -m standardassets -m android -m windows -m windows-mono -m android-sdk-ndk-tools
I see the following output:
Missing module standardassets. Skipping..
Missing module windows. Skipping..
Missing module windows-mono. Skipping..
0.00% of Unity editor "2019.2.12f1" was downloaded
1.22% of Unity editor "2019.2.12f1" was downloaded
2.79% of Unity editor "2019.2.12f1" was downloaded
So even the modules that should be available, can’t be found by the installer.
After the installation there’s only 1 module installed:
So it seems that even the modules that do have an exact match in the Unity Hub CLI don’t get installed.
Installing Unity 2018.4.12f1
When we look at older versions of Unity the list gets even more confusing:
'unity hub.exe' -- --headless install --version "2018.4.12f1" -m standardassets -m android -m windows -m windows-mono -m android-sdk-ndk-tools
Output:
Missing module standardassets. Skipping..
Missing module windows. Skipping..
Missing module windows-mono. Skipping..
0.01% of Unity editor "2018.4.12f1" was downloaded
2.00% of Unity editor "2018.4.12f1" was downloaded
Installing Unity 2017.4.34f1
'unity hub.exe' -- --headless install --version "2017.4.34f1" -m standardassets -m android -m windows -m windows-mono -m android-sdk-nds-tools
Output:
Missing module windows. Skipping..
Missing module windows-mono. Skipping..
0.01% of Unity editor "2017.4.34f1" was downloaded
1.59% of Unity editor "2017.4.34f1" was downloaded
4.15% of Unity editor "2017.4.34f1" was downloaded
Directly calling install-modules
I also tested directly calling install modules using this command which includes all options available according to the CLI help:
'unity hub.exe' -- --headless install-modules --version "2019.2.12f1" -m standardassets -m example -m android -m ios -m appletv -m linux -m samsung -m tizen -m webgl -m windows -m facebook-games -m monodevelop -m vuforia-ar -m mac-il2cpp -m windows-mono -m android-sdk-ndk-tools -m lumin
Output:
Missing module standardassets. Skipping..
Missing module example. Skipping..
Missing module samsung. Skipping..
Missing module tizen. Skipping..
Missing module windows. Skipping..
Missing module monodevelop. Skipping..
Missing module vuforia-ar. Skipping..
Missing module mac-il2cpp. Skipping..
Missing module windows-mono. Skipping..
Adding module facebookgameroom as dependency of facebook-games.
Adding module android as dependency of android-sdk-ndk-tools.
Adding module android-sdk-platform-tools as dependency of android-sdk-ndk-tools.
Adding module android-sdk-build-tools as dependency of android-sdk-ndk-tools.
Adding module android-sdk-platforms as dependency of android-sdk-ndk-tools.
Adding module android-ndk as dependency of android-sdk-ndk-tools.
Omitting module android because it's already installed
So even the modules that (atleast to me) seem to match the CLI documentation, apparently don’t. As they also report as missing once I install it using the CLI.
Question
So basically my problem/question is, how do I install these versions of Unity with the correct modules?



