unitysetup.powershell
unitysetup.powershell copied to clipboard
Detection of component installation
I am evaluating if to adopt for CI this utility but I see that "Test-UnitySetupInstance" only allows to detect the presence of if there is Unity installed but not with what components it is installed. The interesting thing would be the possibility of only downloading and installing the editor and the components that do not exist.
Would it be possible to implement the detection of component installation as u3d does?
https://github.com/DragonBox/u3d/blob/a46fc319139bd6ebe983b4e002bd3f22a85120cd/lib/u3d/installation.rb#L108
https://github.com/DragonBox/u3d/blob/a46fc319139bd6ebe983b4e002bd3f22a85120cd/lib/u3d/installation.rb#L130
This would be a good enhancement to Test-UnitySetupInstance. You can perform your own test by using Get-UnitySetupInstance, which returns the Components that are installed for the instance, e.g. from the README:
Get-UnitySetupInstance
# Example output:
# Version Components Path
# ------- ---------- ----
# 2017.1.2f1 Windows, UWP, UWP_IL2CPP C:\Program Files\Unity-2017.1.2f1\
# 2017.1.3f1 Windows, UWP, UWP_IL2CPP C:\Program Files\Unity-2017.1.3f1\
# 2017.2.1f1 Windows, UWP, UWP_IL2CPP C:\Program Files\Unity-2017.2.1f1\
# 2017.3.1f1 Windows, UWP, UWP_IL2CPP, Linux, Vuforia C:\Program Files\Unity-2017.3.1f1\
# 2018.1.0b4 Windows, UWP, UWP_IL2CPP, Vuforia C:\Program Files\Unity-2018.1.0b4\
# 2018.1.0b8 All C:\Program Files\Unity-2018.1.0b8\
# 2017.1.0p5 Windows, UWP, UWP_IL2CPP C:\Program Files\Unity.2017.1.0p5\
# 2017.1.1f1 Windows, UWP, UWP_IL2CPP C:\Program Files\Unity.2017.1.1f1\
# 2017.1.1p3 Windows, StandardAssets, UWP, UWP_IL2CPP C:\Program Files\Unity.2017.1.1p3\
# 2017.2.0f3 Windows, UWP, UWP_IL2CPP, Vuforia C:\Program Files\Unity.2017.2.0f3\
# 2017.3.0f3 Windows, UWP, UWP_IL2CPP, Mac, Vuforia C:\Program Files\Unity.2017.3.0f3\
A PR to add a Components argument to Test-UnitySetupInstance which ensured all were present in the test would be a great enhancement! =)