Version: 2021.3
Manage your License through the command line
License Troubleshooting

离线(手动)许可证激活

If Unity can’t contact the license server, you can’t activate your license using the Unity Hub or the command line. Typical reasons for failing to connect to the license server include: you don’t have access to the internet; your firewall or proxy settings are blocking the connection; or the Unity license servers are down. For more information, see Activation issues.

当在线激活失败时,您可以尝试在您的机器上手动激活 Unity。您仍然需要访问一台已接入互联网的计算机,但这台计算机不必是要尝试激活 Unity 的计算机。

要手动激活您的 Unity 许可证,请按照以下流程操作:

  1. Generate a license activation file (.alf) from the command line. For example, Unity_v2021.1.0a7.alf.
  2. 使用该 .alf 文件从 Unity 的许可证服务器请求一个 Unity 许可证文件 (.ulf)。
  3. Use that .ulf file to activate your license in Unity from the command line.

从命令行生成许可证激活文件 (.alf)

在 macOS 上,在 Terminal 中输入以下内容(将 <editor-installation-location> 替换为实际安装位置,例如 /Applications/Unity/Unity.app/Contents/MacOS/Unity):

<editor-installation-location> -batchmode -createManualActivationFile -logfile

在 Windows 上,在命令提示符中输入以下内容(将 <editor-installation-location> 替换为实际安装位置,例如 C:\Program Files\Unity\Editor\Unity.exe):

"<editor-installation-location>" -batchmode -createManualActivationFile -logfile

现在您可以请求 Unity 许可证 (.ulf) 文件

请求 Unity 许可证文件 (.ulf) 文件

生成许可证激活 (.alf) 文件后,下一步是从许可证服务器请求您的 Unity 许可证 (.ulf) 文件:

  1. 打开 license.unity3d.com/manual 网页。

  2. 如果出现提示,请登录您的 Unity ID。这是请求 Unity 许可证文件的必要步骤。

    将出现 Manual activation 网页。

  3. 选择 Browse 按钮找到您已使用系统的文件浏览器生成的许可证激活 (.alf) 文件。

    如果上传成功并且 Unity 检测到您选择的文件是许可证激活文件,则文件名会出现在带有绿色复选标记的文本框中。但如果看到红色的 X,请重试。

  4. 选择 Next 按钮。将出现 Activate your license 网页。

  5. 选择您要激活的许可证类型:

    • 如果您选择 Unity Plus or Pro 选项,输入您在购买单个许可证时收到的电子邮件中的序列号。必须严格按照电子邮件中显示的格式输入密钥。例如,PS/SC/E3-XXXX-XXXX-XXXX-XXXX
    • 如果您选择 Unity Personal 选项,您必须选择最符合您当前情况的选项。
  6. 选择 Next 按钮。将出现 Download license file 网页。

  7. 选择 Download license file 按钮。

  8. 如果出现系统提示,请允许 license.unity3d.com/manual 网页的下载。

  9. 打开浏览器的下载位置并查找带有 .ulf 扩展名的新 Unity 许可证文件。

Now you are ready to activate your Unity license from the command line.

从命令行完成您的 Unity 许可证激活

在 macOS 上,在 Terminal 中输入以下内容(将 <editor-installation-location> 替换为实际安装位置,例如 /Applications/Unity/Unity.app/Contents/MacOS/Unity):

<editor-installation-location> -batchmode -manualLicenseFile <yourulffile> -logfile

在 Windows 上,在命令提示符中输入以下内容(将 <editor-installation-location> 替换为实际安装位置,例如 C:\Program Files\Unity\Editor\Unity.exe):

"<editor-installation-location>" -batchmode -manualLicenseFile <yourulffile> -logfile

如果 Unity 显示许可证激活不成功的错误消息,请查看激活问题为您的问题找到解决方案。


  • 在 Unity 2017.2 中更新了许可证激活方法
Manage your License through the command line
License Troubleshooting
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961