Version: 2022.2
言語: 日本語
License activation methods
Manual license activation

Manage your license through the command line

Unity を使用するには、アクティベートされたライセンスが必要です。Unity Plus および Pro ライセンスの場合は、シリアル番号が必要です。Unity Personal ライセンスの場合は、シリアル番号は必要ありません。

The primary license activation method is the Unity Hub.

The following information covers an alternate method for activating a license and returning a license by using the command line. You might consider this method in situations such as:

  • You have internet access, but you use Unity in headless mode (without a GUI) for automated tasks, such as builds and tests.
  • You have internet access, but you’re unable or unwilling to install the Unity Hub.

Unity のライセンス情報がわからない場合は、ライセンスの Owner (所有者) に尋ねてください。所有者は Organization (組織) を通してシートを割り当てることができます。または、Unity のカスタマーサービスに問い合わせてください。

コマンドラインを使用したライセンスのアクティベーション

Before activating your Unity license by using the command line, make sure that the license file folder exists. See “where is my Unity license file stored” in License troubleshooting . Also make sure that you have write permission to this folder.

ノート: Personal ライセンスにはシリアル番号がないため、コマンドライン手順は Plus と Pro ライセンスにのみ使用できます。Personal ライセンスのアクティベーションには、Unity Hub を使用します。他の OS を使用している場合は、Hub からライセンスを管理することができます。

macOS

Enter the following command into the Terminal to launch Unity and activate your license:

<unity-command-location> -quit -batchmode -serial SB-XXXX-XXXX-XXXX-XXXX-XXXX -username 'name@example.com' -password 'XXXXXXXXXXXXX'

Replace <unity-command-location> with the full path to your Editor application, concatenated with /Contents/MacOS/Unity. For example, if you installed a 2022.2.0b4 Editor to the default location, <unity-command-location> is:

/Applications/Unity/Hub/Editor/2022.2.0b4/Unity.app/Contents/MacOS/Unity


macOS example

/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'

ヒント: Jenkins のような継続的インテグレーション (CI) ツールを使用して、コマンドラインでアクティベートする場合は、WindowServer エラーを防ぐために -nographics フラグを加えてください。

Windows

Enter the following command into the Command Prompt to launch Unity and activate your license:

"<editor-installation-location>" -batchmode -username name@example.com -password XXXXXXXXXXXXX -serial E3-XXXX-XXXX-XXXX-XXXX-XXXX -quit

Replace <editor-installation-location> with the full path to your Editor application. For example, if you installed a 2022.2.0b4 Editor to the default location, <editor-installation-location> is:

C:\Program Files\Unity\Hub\Editor\2022.2.0b4\Editor\Unity.exe


Windows example

"C:\Program Files\Unity\Hub\Editor\2022.2.0b4\Editor\Unity.exe" -batchmode -username name@example.com -password XXXXXXXXXXXXX -serial E3-XXXX-XXXX-XXXX-XXXX-XXXX -quit


Next steps and troubleshooting

Unity がライセンスサーバーと通信するのに十分な時間を確保するため、このコマンドを実行してから数秒待ってください。アクティベーションに失敗した場合は、Editor.log を開いて情報を得ることができます。アクティベーションエラーが発生した場合は、Activation issues を確認して、解決策を見つけてください。

コマンドラインを使用したライセンスの返却

macOS

Enter the following command into the Terminal to return the license:

<unity-command-location> -quit -batchmode -returnlicense -username 'name@example.com' -password 'XXXXXXXXXXXXX'

Replace <unity-command-location> with the full path to your Editor application, concatenated with /Contents/MacOS/Unity. For example, if you installed a 2022.2.0b4 Editor to the default location, <unity-command-location> is:

/Applications/Unity/Hub/Editor/2022.2.0b4/Unity.app/Contents/MacOS/Unity


macOS example

/Applications/Unity/Hub/Editor/2022.2.0b4/Unity.app/Contents/MacOS/Unity -quit -batchmode -returnlicense -username 'name@example.com' -password 'XXXXXXXXXXXXX'


Windows

Enter the following into the Command Prompt to return the license

"<editor-installation-location>" -quit -batchmode -returnlicense -username name@example.com -password XXXXXXXXXXXXX

Replace <editor-installation-location> with the full path to your Editor application. For example, if you installed a 2022.2.0b4 Editor to the default location, <editor-installation-location> is:

C:\Program Files\Unity\Hub\Editor\2022.2.0b4\Editor\Unity.exe


Windows example

"C:\Program Files\Unity\Hub\Editor\2022.2.0b4\Editor\Unity.exe" -quit -batchmode -returnlicense -username name@example.com -password XXXXXXXXXXXXX


Next steps and troubleshooting

Wait a few seconds after running this command to give Unity enough time to communicate with the license server. You can use the Hub to confirm that you returned your license by opening the Preferences menu () and selecting Licenses. If you experience issues, see Troubleshooting.

その他の参考資料

License activation methods
Manual license activation
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961