UnityInstall

通过 Unity Hub 安装 Unity 时卡住的解决方法

unity

本篇内容参考了博客文章UnityHub下载卡住怎么办?-马派森,首先进行感谢。

新版Unity不再提供独立的安装包,而是通过Unity Hub进行安装和模块管理,但是由于网络原因,可能会出现下载失败而导致的安装过程卡住的情况,在此记录一次安装过程并提供一种本地安装解决方案。

安装选项

在 Unity Hub 中选择安装 “Unity 2019.3.4f1”,并选择以下模块:

  • Microsoft Visual Studio Community 2019
  • Windows Build Support(IL2CPP)
  • Documentation
  • Language-简体中文

在弹出的安装窗口下方,下载进度卡在”66%”。

排错

此时检查 Unity Hub 日志,Win10 下的日志文件路径为C:\Users\canglan\AppData\Roaming\UnityHub\logs\info-log.json,相关记录如下:

1
2
3
4
5
6
7
8
9
10
11
12
{"moduleName":"EditorDownloader","level":"info","message":"[ 'Editor Downloader 2019.3.4f1: starting' ]","timestamp":"2020-04-08T02:45:21.241Z"}
{"moduleName":"DownloadsCluster","level":"info","message":"[ 'Cluster total download size: 375.83MB' ]","timestamp":"2020-04-08T02:45:23.770Z"}
{"moduleName":"DownloadsCluster","level":"info","message":"[ 'Cluster cluster-2019.3.4f1: downloads starting' ]","timestamp":"2020-04-08T02:45:23.771Z"}
{"moduleName":"DownloadRequest","level":"info","message":"[ 'Starting the download of https://download.unitychina.cn/download_unity/3274385dcda2/TargetSupportInstaller/UnitySetup-Windows-IL2CPP-Support-for-Editor-2019.3.4f1.exe to C:\\\\Users\\\\canglan\\\\AppData\\\\Local\\\\Temp\\\\unityhub-fb6b5820-7942-11ea-b78f-ef02bb27dfc0\\\\UnitySetup-Windows-IL2CPP-Support-for-Editor-2019.3.4f1.exe' ]","timestamp":"2020-04-08T02:45:23.771Z"}
{"moduleName":"DownloadRequest","level":"info","message":"[ 'Starting the download of https://storage.googleapis.com/docscloudstorage/2019.3/UnityDocumentation.zip to C:\\\\Users\\\\canglan\\\\AppData\\\\Local\\\\Temp\\\\unityhub-fb6b5820-7942-11ea-b78f-ef02bb27dfc0\\\\UnityDocumentation.zip' ]","timestamp":"2020-04-08T02:45:23.772Z"}
{"moduleName":"DownloadRequest","level":"info","message":"[ 'Starting the download of https://go.microsoft.com/fwlink/?linkid=2086755 to C:\\\\Users\\\\canglan\\\\AppData\\\\Local\\\\Temp\\\\unityhub-fb6b5820-7942-11ea-b78f-ef02bb27dfc0\\\\vs_Community.exe' ]","timestamp":"2020-04-08T02:45:23.772Z"}
{"moduleName":"DownloadRequest","level":"info","message":"[ 'Starting the download of https://new-translate.unity3d.jp/v1/live/54/2019.3/zh-hans to C:\\\\Users\\\\canglan\\\\AppData\\\\Local\\\\Temp\\\\unityhub-fb6b5820-7942-11ea-b78f-ef02bb27dfc0\\\\zh-hans.po' ]","timestamp":"2020-04-08T02:45:23.772Z"}
{"moduleName":"DownloadRequest","level":"info","message":"[ 'Starting the download of https://download.unitychina.cn/download_unity/3274385dcda2/Windows64EditorInstaller/UnitySetup64-2019.3.4f1.exe to C:\\\\Users\\\\canglan\\\\AppData\\\\Local\\\\Temp\\\\unityhub-fb6b5820-7942-11ea-b78f-ef02bb27dfc0\\\\UnitySetup64-2019.3.4f1.exe' ]","timestamp":"2020-04-08T02:45:24.078Z"}
{"moduleName":"EditorDownloader","level":"info","message":"[ 'Editor Download 2019.3.4f1: downloads starting, total size: 1.89GB)' ]","timestamp":"2020-04-08T02:45:24.079Z"}
{"moduleName":"DownloadManager","level":"info","message":"[ 'download ended with status: 3 C:\\\\Users\\\\canglan\\\\AppData\\\\Local\\\\Temp\\\\unityhub-fb6b5820-7942-11ea-b78f-ef02bb27dfc0\\\\vs_Community.exe' ]","timestamp":"2020-04-08T02:45:27.818Z"}
{"moduleName":"DownloadRequest","level":"warn","message":"[ 'Something went wrong while downloading https://storage.googleapis.com/docscloudstorage/2019.3/UnityDocumentation.zip Error: connect ETIMEDOUT 172.217.160.112:443 Error: connect ETIMEDOUT 172.217.160.112:443\\n at Object.exports._errnoException (util.js:1024:11)\\n at exports._exceptionWithHostPort (util.js:1047:20)\\n at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1150:14)' ]","timestamp":"2020-04-08T02:45:44.780Z"}
{"moduleName":"DownloadRequest","level":"warn","message":"[ 'Something went wrong while checking progress of https://storage.googleapis.com/docscloudstorage/2019.3/UnityDocumentation.zip Error: connect ETIMEDOUT 172.217.160.112:443 Error: connect ETIMEDOUT 172.217.160.112:443\\n at Object.exports._errnoException (util.js:1024:11)\\n at exports._exceptionWithHostPort (util.js:1047:20)\\n at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1150:14)' ]","timestamp":"2020-04-08T02:45:44.780Z"}

可以看到每个下载文件的实际下载链接和保存路径,此次下载的保存路径为C:\Users\canglan\AppData\Local\Temp\unityhub-fb6b5820-7942-11ea-b78f-ef02bb27dfc0,进入文件夹,可以看到”UnitySetup64-2019.3.4f1.exe”,”UnitySetup-Windows-IL2CPP-Support-for-Editor-2019.3.4f1.exe”,”vs_Community.exe”三个文件已经下载完成,文档文件和语言包下载失败。

本地安装

对于下载失败的文件,可通过日志记录中的实际下载地址进行下载后继续安装,而已经下载完成的文件可直接安装。其中 “vs_Community.exe” 也同样只是一个安装器,可以在打开后选择并下载安装 Visual Studio 及组件。

如果Unity安装包下载失败,也可通过以下链接下载:

最后,独立安装的 Unity 不会在 Unity Hub 中显示,如果需要,可以通过 “Unity Hub-安装-定位” 进行导入,默认路径为C:\Program Files\Unity\Editor\Unity.exe

同样的方法也可用于提取其他版本或模块的实际下载链接,单独下载后进行本地安装。安装完成后,可将临时文件夹及安装包删除以释放磁盘空间。


Unity: 2019.3.4f1
Unity Hub: 2.0.0
Win10: 1909


  • 版权声明: 本博客所有文章除特别声明外,均采用 Apache License 2.0 许可协议。转载请注明出处!
  • © 2020 canglan
  • Powered by Hexo Theme Ayer
  • PV: UV:

请我喝杯咖啡吧~