unitysetup.powershell
unitysetup.powershell copied to clipboard
Android installer does not download the SDK, NDK and OpenJDK folders to PlaybackEngines/AndroidPlayer
Installing the Android module with Unity Hub and Install-UnitySetupInstance
yield different results. Notably, the following folders are missing in Editor\Data\PlaybackEngines\AndroidPlayer
with the latter:
- NDK
- OpenJDK
- SDK
Repro:
Find-UnitySetupInstaller -Version '2020.3.37f1' -Components 'Windows','Android' | Install-UnitySetupInstance
UnitySetup predates UnityHub and discovers downloads by scanning the releases websites, downloads the components and invokes them itself. The Unity installer used to bundle the Android tools in with the component, but that was split at some point to avoid duplicates of the tools if you don't need them (you can set the paths for you Android build tools inside Unity).
I'd love to install the Android tools from UnitySetup, but installing Android requires accepting the license agreement and I'm not sure how best to go about that in an automated fashion that doesn't run afoul of some policy so I've avoided it so far.
Open to ideas though!
So I know UnitySetup predates the UnityHub, but can it use the UnityHub?
Apparently, "Unity Hub.exe" has a bunch of commands. I just got this in email when I complained to Unity that wasn't a way to headlessly install Android JDK/SDK/NDK tools:
The hub does support a command line to do the full installation, including Child Modules (Open JDK + Android SDK & NDK), this would be the command to install Android + the JDK & NDK to an existing Unity installation:
"Unity Hub.exe" -- --headless install-modules --version 2020.3.38f1 -m android --cm
To install it all from scratch then something like this should work:
"Unity Hub.exe" -- --headless install --version 2020.3.38f1 -m android --cm
Is the Hub installed with the Unity installation? Could Android be added on after the original install?
I think moving to UnityHub would be a great change, but also a large one that will need lots of testing for all the use cases included in UnitySetup, e.g. the DSC resources.
I'm not sure if the Hub comes along with Unity if it's installed with UnitySetup, we'd have to test that from a clean machine. I suspect Android could be installed after the original install, but it'd be another thing to test.
Same problem, my android build requires NDK and installing via following wont install NDK
Install-UnitySetupInstance -Installers (Find-UnitySetupInstaller -Version '$(unitygetprojectversion.projectVersion)' -Components 'Windows', 'Android') -Verbose
@mandalorianbob did you test unity hub method with NDK?