关注

如何实现完全自动的构建过程,可以获取并安装任何版本的Unity到我们的构建环境?

问题
  • 我需要能够安装Unity到Mac OSX和Windows上的特定路径。 此外还希望通过下载单独的组件后进行自动安装。
原因
 
您可能不想使用Unity下载助手来安装Unity。
 
解决方案
 
如果想自动安装Unity,可以使用命令行(或脚本)而不使用下载助手。
 
在Windows平台:

在Windows平台:您可以在Windows上使用此命令以静默方式将Unity安装到特定文件夹:

UnitySetup64.exe /S /D=C:\Your Directory\Unity

在这种情况下,该命令将以静默方式将Unity安装到文件夹C:\Your Directory\Unity,这将是安装Unity的根目录。 在这种情况下,Unity Editor可执行文件将安装到C:\Your Directory\Unity\Editor\Unity.exe目录。 “/ D”参数必须在末尾且不带有引号,即使路径中包含了空格。

在OSX平台

sudo installer [-dumplog] -package Unity.pkg -target /

分离组件:

此外,如果要单独安装组件,可以对所有组件安装程序使用相同的命令。 他们的地址是:

对于Windows:
http://download.unity3d.com/download_unity/{Changeset}/Windows64EditorInstaller/UnitySetup64.exe
http://download.unity3d.com/download_unity/{Changeset}/WindowsDocumentationInstaller/UnityDocumentationSetup.exe
http://download.unity3d.com/download_unity/{Changeset}/WindowsDevelopmentWebPlayerInstaller/UnityWebPlayerDevelopment.exe
http://download.unity3d.com/download_unity/{Changeset}/WindowsStandardAssetsInstaller/UnityStandardAssetsSetup.exe
http://download.unity3d.com/download_unity/{Changeset}/WindowsExampleProjectInstaller/UnityExampleProjectSetup.exe
http://download.unity3d.com/download_unity/{Changeset}/TargetSupportInstaller/UnitySetup-Windows-Support-for-Editor-{version}.exe
http://download.unity3d.com/download_unity/{Changeset}/TargetSupportInstaller/UnitySetup-Android-Support-for-Editor-{version}.exe
http://download.unity3d.com/download_unity/{Changeset}/TargetSupportInstaller/UnitySetup-iOS-Support-for-Editor-{version}.exe
http://download.unity3d.com/download_unity/{Changeset}/TargetSupportInstaller/UnitySetup-AppleTV-Support-for-Editor-{version}.exe
http://download.unity3d.com/download_unity/{Changeset}/TargetSupportInstaller/UnitySetup-Linux-Support-for-Editor-{version}.exe
http://download.unity3d.com/download_unity/{Changeset}/TargetSupportInstaller/UnitySetup-Mac-Support-for-Editor-{version}.exe
http://download.unity3d.com/download_unity/{Changeset}/TargetSupportInstaller/UnitySetup-Metro-Support-for-Editor-{version}.exe
http://download.unity3d.com/download_unity/{Changeset}/TargetSupportInstaller/UnitySetup-UWP-IL2CPP-Support-for-Editor-{version}.exe
http://download.unity3d.com/download_unity/{Changeset}/TargetSupportInstaller/UnitySetup-Samsung-TV-Support-for-Editor-{version}.exe
http://download.unity3d.com/download_unity/{Changeset}/TargetSupportInstaller/UnitySetup-Tizen-Support-for-Editor-{version}.exe
http://download.unity3d.com/download_unity/{Changeset}/TargetSupportInstaller/UnitySetup-WebGL-Support-for-Editor-{version}.exe
 
对于OSX:
http://download.unity3d.com/download_unity/{Changeset}/MacEditorInstaller/Unity.pkg
http://download.unity3d.com/download_unity/{Changeset}/MacDocumentationInstaller/Documentation.pkg
http://download.unity3d.com/download_unity/{Changeset}/MacWebPlayerInstaller/WebPlayer.pkg
http://download.unity3d.com/download_unity/{Changeset}/MacStandardAssetsInstaller/StandardAssets.pkg
http://download.unity3d.com/download_unity/{Changeset}/MacExampleProjectInstaller/Examples.pkg
http://download.unity3d.com/download_unity/{Changeset}/MacEditorTargetInstaller/UnitySetup-Mac-Support-for-Editor-{version}.pkg
http://download.unity3d.com/download_unity/{Changeset}/MacEditorTargetInstaller/UnitySetup-Android-Support-for-Editor-{version}.pkg
http://download.unity3d.com/download_unity/{Changeset}/MacEditorTargetInstaller/UnitySetup-iOS-Support-for-Editor-{version}.pkg
http://download.unity3d.com/download_unity/{Changeset}/MacEditorTargetInstaller/UnitySetup-AppleTV-Support-for-Editor-{version}.pkg
http://download.unity3d.com/download_unity/{Changeset}/MacEditorTargetInstaller/UnitySetup-Linux-Support-for-Editor-{version}.pkg
http://download.unity3d.com/download_unity/{Changeset}/MacEditorTargetInstaller/UnitySetup-Samsung-TV-Support-for-Editor-{version}.pkg
http://download.unity3d.com/download_unity/{Changeset}/MacEditorTargetInstaller/UnitySetup-Tizen-Support-for-Editor-{version}.pkg
http://download.unity3d.com/download_unity/{Changeset}/MacEditorTargetInstaller/UnitySetup-WebGL-Support-for-Editor-{version}.pkg
http://download.unity3d.com/download_unity/{Changeset}/MacEditorTargetInstaller/UnitySetup-Windows-Support-for-Editor-{version}.pkg
 
重要的是要注意安装顺序(你应该先安装编辑器,然后再安装组件)。
 
更多信息

 
 
这篇文章有帮助吗?
0 人中有 0 人觉得有帮助
还有其它问题?提交请求

0 评论

登录写评论。