Search Unity

Installing Unity through Unity Hub CLI missing options when installing modules

Discussion in 'Unity Hub' started by devedse, Nov 20, 2019.

  1. devedse

    devedse

    Joined:
    Jan 2, 2017
    Posts:
    7
    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:

    1. User kicks of a build
    2. Build script starts on build server
    3. Unity build server opens projectverison.txt
    4. PowerShell script starts and uses Unity Hub CLI to check if this specific version of Unity is already installed
    5. If not it installs it using Unity Hub CLI
    6. 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:
    Code (Boo):
    1. '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:
    Code (Boo):
    1. Missing module standardassets. Skipping..
    2. Missing module windows. Skipping..
    3. Missing module windows-mono. Skipping..
    4. 0.00% of Unity editor "2019.2.12f1" was downloaded
    5. 1.22% of Unity editor "2019.2.12f1" was downloaded
    6. 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:

    Code (CSharp):
    1. 'unity hub.exe' -- --headless install --version "2018.4.12f1" -m standardassets -m android -m windows -m windows-mono -m android-sdk-ndk-tools



    Output:
    Code (Boo):
    1. Missing module standardassets. Skipping..
    2. Missing module windows. Skipping..
    3. Missing module windows-mono. Skipping..
    4.  
    5. 0.01% of Unity editor "2018.4.12f1" was downloaded
    6. 2.00% of Unity editor "2018.4.12f1" was downloaded
    Installing Unity 2017.4.34f1

    Code (CSharp):
    1. 'unity hub.exe' -- --headless install --version "2017.4.34f1" -m standardassets -m android -m windows -m windows-mono -m android-sdk-nds-tools



    Output:
    Code (Boo):
    1. Missing module windows. Skipping..
    2. Missing module windows-mono. Skipping..
    3.  
    4. 0.01% of Unity editor "2017.4.34f1" was downloaded
    5. 1.59% of Unity editor "2017.4.34f1" was downloaded
    6. 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:
    Code (Boo):
    1. '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:
    Code (Boo):
    1. Missing module standardassets. Skipping..
    2. Missing module example. Skipping..
    3. Missing module samsung. Skipping..
    4. Missing module tizen. Skipping..
    5. Missing module windows. Skipping..
    6. Missing module monodevelop. Skipping..
    7. Missing module vuforia-ar. Skipping..
    8. Missing module mac-il2cpp. Skipping..
    9. Missing module windows-mono. Skipping..
    10. Adding module facebookgameroom as dependency of facebook-games.
    11. Adding module android as dependency of android-sdk-ndk-tools.
    12. Adding module android-sdk-platform-tools as dependency of android-sdk-ndk-tools.
    13. Adding module android-sdk-build-tools as dependency of android-sdk-ndk-tools.
    14. Adding module android-sdk-platforms as dependency of android-sdk-ndk-tools.
    15. Adding module android-ndk as dependency of android-sdk-ndk-tools.
    16. 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?
     
    Last edited: Nov 20, 2019
  2. dzamani

    dzamani

    Joined:
    Feb 25, 2014
    Posts:
    108
    Where you have your Unity installed, there is a modules.json file, the "id" of the elements in that file are what you should use with the command line.
    For example there is "windows-il2cpp" for Windows Build Support (IL2CPP). Not sure if it's the same name for all Unity versions though.

    The mismatch in the help is maybe for future versions ?
     
  3. devedse

    devedse

    Joined:
    Jan 2, 2017
    Posts:
    7
    Using your advise I quickly created a tool to extract what modules are available per installed version. This is the output for me:

    Code (CSharp):
    1.  
    2. Unity Installations:
    3.  
    4. ==== Unity 2017.4.32f1 ===
    5. >>>  -m android
    6.       -m appletv
    7.       -m documentation
    8.       -m example
    9.       -m facebookgameroom
    10.       -m facebook-games
    11.       -m ios
    12.       -m linux
    13.       -m mac
    14. >>>  -m metro
    15.       -m monodevelop
    16.       -m standardassets
    17. >>>  -m uwp-il2cpp
    18.       -m visualstudio
    19. >>>  -m visualstudioenterpriseunityworkload
    20.       -m visualstudioprofessionalunityworkload
    21. >>>  -m vuforia-ar
    22.       -m webgl
    23.  
    24. ==== Unity 2018.2.21f1 ===
    25. >>>  -m android
    26.       -m appletv
    27.       -m documentation
    28.       -m facebookgameroom
    29.       -m facebook-games
    30.       -m ios
    31.       -m language-ja
    32.       -m language-ko
    33.       -m language-zh-cn
    34.       -m linux
    35.       -m mac-mono
    36. >>>  -m uwp-.net
    37. >>>  -m uwp-il2cpp
    38.       -m visualstudio
    39. >>>  -m visualstudioenterpriseunityworkload
    40.       -m visualstudioprofessionalunityworkload
    41.       -m vuforia-ar
    42.       -m webgl
    43. >>>  -m windows-il2cpp
    44.  
    45. ==== Unity 2018.4.9f1 ===
    46. >>>  -m android
    47.       -m appletv
    48.       -m documentation
    49.       -m facebookgameroom
    50.       -m facebook-games
    51.       -m ios
    52.       -m language-ja
    53.       -m language-ko
    54.       -m language-zh-cn
    55.       -m linux
    56.       -m mac-mono
    57. >>>  -m uwp-.net
    58. >>>  -m uwp-il2cpp
    59.       -m visualstudio
    60. >>>  -m visualstudioenterpriseunityworkload
    61.       -m visualstudioprofessionalunityworkload
    62. >>>  -m vuforia-ar
    63.       -m webgl
    64.       -m windows-il2cpp
    65.  
    66. ==== Unity 2019.1.14f1 ===
    67. >>>  -m android
    68. >>>  -m android-ndk
    69. >>>  -m android-sdk-build-tools
    70. >>>  -m android-sdk-ndk-tools
    71. >>>  -m android-sdk-platforms
    72. >>>  -m android-sdk-platform-tools
    73.       -m appletv
    74.       -m documentation
    75.       -m facebookgameroom
    76.       -m facebook-games
    77.       -m ios
    78.       -m language-ja
    79.       -m language-ko
    80.       -m language-zh-hans
    81.       -m language-zh-hant
    82. >>>  -m linux
    83.       -m lumin
    84.       -m mac-mono
    85. >>>  -m universal-windows-platform
    86.       -m visualstudio
    87. >>>  -m visualstudioenterpriseunityworkload
    88.       -m visualstudioprofessionalunityworkload
    89. >>>  -m vuforia-ar
    90.       -m webgl
    91. >>>  -m windows-il2cpp
    Hopefully this is usefull to someone
     
    dzamani likes this.