包含此页的版本:
不含此页的版本:
要使用 Unity,您需要激活的许可证。
Unity Pro 和 Unity Personal 的主要许可证激活方法是 Unity Hub。有关激活 Unity Industry 许可证的信息,请参阅 Unity 支持文章如何激活或退回 Unity Industry 许可证。
以下信息介绍了 Unity Hub 的替代方法,用于使用命令行激活和返回 Unity Pro 的许可证。在以下情况下,您可以考虑使用此方法:
注意:以下过程不适用于 Unity Personal。要激活 Unity Personal 的许可证,请登录 Unity Hub。要返回个人许可证,请注销 Unity Hub。
如果您不知道您的 Unity 许可证信息,请与许可证所有者联系。所有者可以通过组织为您分配席位,或者您可以联系 Unity 客户服务。
在使用命令行激活 Unity 许可证之前,请确保许可证文件夹存在。请参阅许可证故障排除中的 Unity 许可证文件位置。此外,请确保您具有对此文件夹的写入权限。
在终端中输入以下命令以启动 Unity 并激活您的许可证:
<unity-command-location> -quit -batchmode -serial SB-XXXX-XXXX-XXXX-XXXX-XXXX -username 'name@example.com' -password 'XXXXXXXXXXXXX'
笔记:
取代<unity-command-location>替换为 Unity 编辑器应用程序的完整路径,并连接/Contents/MacOS/Unity.例如,如果您安装了2022.2.0b4Editor 到默认位置,<unity-command-location>是:
/Applications/Unity/Hub/Editor/2022.2.0b4/Unity.app/Contents/MacOS/Unity
如果要在不激活其序列号的情况下激活指定用户许可证,请使用相同的命令,但在指定-serial关键词:
... -serial -username 'name@example.com' -password 'XXXXXXXXXXXXX'
以下示例激活指定用户许可证而不激活其序列号:
/Applications/Unity/Hub/Editor/2022.2.0b4/Unity.app/Contents/MacOS/Unity -quit -batchmode -serial -username 'name@example.com' -password 'XXXXXXXXXXXXX'
以下示例激活序列号。如果您的计划支持指定用户许可,它会激活该许可证并激活其序列号。
/Applications/Unity/Hub/Editor/2022.2.0b4/Unity.app/Contents/MacOS/Unity -quit -batchmode -serial SB-XXXX-XXXX-XXXX-XXXX-XXXX -username 'name@example.com' -password 'XXXXXXXXXXXXX'
在命令提示符中输入以下命令以启动 Unity 并激活您的许可证:
"<editor-installation-location>" -quit -batchmode -serial E3-XXXX-XXXX-XXXX-XXXX-XXXX -username name@example.com -password XXXXXXXXXXXXX
笔记:
取代<editor-installation-location>替换为 Unity 编辑器应用程序的完整路径。例如,如果您安装了2022.2.0b4Editor 到默认位置,<editor-installation-location>是:
C:\Program Files\Unity\Hub\Editor\2022.2.0b4\Editor\Unity.exe
如果要在不激活其序列号的情况下激活指定用户许可证,请使用相同的命令,但在指定-serial关键词:
... -serial -username 'name@example.com' -password 'XXXXXXXXXXXXX'
以下示例激活指定用户许可证而不激活其序列号:
"C:\Program Files\Unity\Hub\Editor\2022.2.0b4\Editor\Unity.exe" -quit -batchmode -serial -username name@example.com -password XXXXXXXXXXXXX
以下示例激活序列号。如果您的计划支持指定用户许可,它会激活该许可证并激活其序列号。
"C:\Program Files\Unity\Hub\Editor\2022.2.0b4\Editor\Unity.exe" -quit -batchmode -serial E3-XXXX-XXXX-XXXX-XXXX-XXXX -username name@example.com -password XXXXXXXXXXXXX
运行此命令后等待几秒钟,以便 Unity 有足够的时间与许可证服务器通信。如果激活失败,您可以打开Editor.log以获取信息。对于任何激活错误,请检查激活问题以查找问题的解决方案。
在终端中输入以下命令以归还许可证:
<unity-command-location> -quit -batchmode -returnlicense -username 'name@example.com' -password 'XXXXXXXXXXXXX'
取代<unity-command-location>替换为 Unity 编辑器应用程序的完整路径,并连接/Contents/MacOS/Unity.例如,如果您安装了2022.2.0b4Editor 到默认位置,<unity-command-location>是:
/Applications/Unity/Hub/Editor/2022.2.0b4/Unity.app/Contents/MacOS/Unity
/Applications/Unity/Hub/Editor/2022.2.0b4/Unity.app/Contents/MacOS/Unity -quit -batchmode -returnlicense -username 'name@example.com' -password 'XXXXXXXXXXXXX'
在命令提示符中输入以下内容以返回许可证
"<editor-installation-location>" -quit -batchmode -returnlicense -username name@example.com -password XXXXXXXXXXXXX
取代<editor-installation-location>替换为 Unity 编辑器应用程序的完整路径。例如,如果您安装了2022.2.0b4Editor 到默认位置,<editor-installation-location>是:
C:\Program Files\Unity\Hub\Editor\2022.2.0b4\Editor\Unity.exe
"C:\Program Files\Unity\Hub\Editor\2022.2.0b4\Editor\Unity.exe" -quit -batchmode -returnlicense -username name@example.com -password XXXXXXXXXXXXX
运行此命令后等待几秒钟,以便 Unity 有足够的时间与许可证服务器通信。您可以使用 Hub 通过打开首选项菜单 (
) 并选择许可证来确认您已退还许可证。如果遇到问题,请参阅故障排除。