Feature request: Add ability to install Unity modules that aren't listed in the ComponentType enum
Some NDA-protected platforms distribute their Unity SDKs through installers that work pretty much identically to the publicly-available ones. I'd like to be able to install these modules through UnitySetup; of course you'd still have to retrieve the modules yourself, but once you have them then I see no reason not to stuff them in a UnitySetupResource and hand them off to Install-UnitySetupPackage.
Not sure why I didn't get notifications for these issues, thanks for making them.
UnitySetupResource and Install-UnitySetupPackage are internal to the module, but looking through the code, I think you could craft a set of UnitySetupInstaller objects, put the necessary installer .exes into the cache (defaults to ~/.unitysetup/Installers/Unity-<Version>/ and then pass that list to Install-UnitySetupInstance. That method should find your cached installers and invoke them in the same manner as the other installers.
For the ComponentType as long as you don't use one of the core installers components (Windows/Mac/Linux), but one of the others then I think it's essentially ignored in this method.
Note:
Find-UnitySetupInstancewon't of course discover the component and any DSC resources won't support it, but you should be able to install these components.
Below is some output from the list of UnitySetupInstallers returned from Find-UnitySetupInstaller. You'd have to set your new entries in the list up to have either a valid DownloadUri or alternatively put the installer in the cache as mentioned above and make sure the DownloadUri file name matches. I believe the Length needs to be the correct size in bytes of the executable as well.
Note: I haven't tried this, but I believe it should be possible. If you have ideas for better supporting this use case I'm open to PRs and discussion! =)
PS > $installers = Find-UnitySetupInstaller -Components Windows,UWP -Version 2020.3.12f1
PS > $installers
ComponentType : Windows
Version : 2020.3.12f1
Length : 2912409264
LastModified : 2021-06-15 11:52:41
DownloadUrl : https://download.unity3d.com/download_unity/b3b2c6512326/Windows64EditorInstaller/UnitySetup64-2020.3.1
2f1.exe
ComponentType : UWP_IL2CPP
Version : 2020.3.12f1
Length : 286379136
LastModified : 2021-06-15 11:51:35
DownloadUrl : https://download.unity3d.com/download_unity/b3b2c6512326/TargetSupportInstaller/UnitySetup-Universal-Wi
ndows-Platform-Support-for-Editor-2020.3.12f1.exe