A tool to activate Unity license.
npm install unity-activateunity-activate
===
A tool to automate the manual activation of unity license using puppeteer.
Inspired by https://github.com/MizoTake/unity-license-activate (@MizoTake).

!license
!downloads
!release

``sh`
npm install unity-activate
`js
const { ActivatorOptions, Activator } = require('unity-activate');
(async () => {
new Activator({
file :'input.alf',
username :'username',
password :'password',
authKey :'authenticator_key',
serial :'serial_code',
out :'output_dir',
}).run();
})();
`
`sh`Installation:
npm install -g unity-activate
`sh
Usage:
$ unity-activate [opts] <*.alf>
Activate Unity activation license file (Unity_v*.alf or Unity_lic.alf)
NOTE: If two-factor authentication is enabled, the verify code will be requested.
Options:
-o, --out
$3
Create a license activation file and import license file by command.
`sh
On Windows:
$ "C:\Program Files\Unity\Editor\Unity.exe" -batchmode -createManualActivationFileOn macOS:
$ /Applications/Unity/Unity.app/Contents/MacOS/Unity -batchmode -createManualActivationFile
`Or, with UnityHub (
Settings > License Management > MANUAL ACTIVATION > SAVE LICENSE REQUEST).
$3
Run
unity-activate to download the *.ulf file.`sh
For personal license (with interaction):
$ unity-activate *.alf
$ > enter the username and password
$ username: your@email.com
$ password: *
...For personal license:
$ unity-activate --username your@email.com --password your_password *.alfFor professional license (with --serial option):
$ unity-activate --username your@email.com --password your_password --serial your_serial_code *.alfUse environment variables instead of options:
$ export UNITY_USERNAME=your@email.com
$ export UNITY_PASSWORD=your_password
$ export UNITY_SERIAL=your_serial_code # If empty, activate as personal license.
$ unity-activate *.alf
`
$3
Now that you have your license file, you can activate your Unity account by command.
`sh
On Windows:
$ "C:\Program Files\Unity\Editor\Unity.exe" -batchmode -manualLicenseFile *.ulfOn macOS:
$ /Applications/Unity/Unity.app/Contents/MacOS/Unity -batchmode -manualLicenseFile *.ulf
`Or, with UnityHub.

$3
Signing in to Unity requires authentication via email or a authenticator app (eg. Google Authenticator).
You can use an authenticator key instead of those.
`sh
$ unity-activate --username your@email.com --password your_password --key your_authenticator_key *.alf
`#### How to obtain authenticator key
- Login to Unity account and activate new two factor authentication.
Go to https://id.unity.com/en/settings/tfa/new and click
Start setup

- Select Authenticator App and click Next

- Click Can't scan the barcode?`. Issues are very valuable to this project.
- Ideas are a valuable source of contributions others can make
- Problems show where this project is lacking
- With a question you show where contributors can improve the user experience
Pull requests are, a great way to get your ideas into this repository.
This is an open source project that I am developing in my spare time.
If you like it, please support me.
With your support, I can spend more time on development. :)

* MIT
*  mob-sakai  !GitHub followers
* GitHub page : https://github.com/mob-sakai/unity-activate
* Releases : https://github.com/mob-sakai/unity-activate/releases
* Issue tracker : https://github.com/mob-sakai/unity-activate/issues
* Change log : https://github.com/mob-sakai/unity-activate/blob/main/CHANGELOG.md