Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mob-sakai/unity-activate

A tool to activate Unity license.
https://github.com/mob-sakai/unity-activate

activate license-management npm-package unity unity3d

Last synced: 7 days ago
JSON representation

A tool to activate Unity license.

Awesome Lists containing this project

README

        

unity-activate
===

A tool to automate the manual activation of unity license using puppeteer.

Inspired by https://github.com/MizoTake/unity-license-activate (@MizoTake).

[![npm](https://img.shields.io/npm/v/unity-activate)](https://www.npmjs.com/package/unity-activate)
![license](https://img.shields.io/npm/l/unity-activate)
![downloads](https://img.shields.io/npm/dy/unity-activate)
![release](https://github.com/mob-sakai/unity-activate/workflows/release/badge.svg)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)





## Usage as a node module:

```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();
})();
```





## Usage as a command-line utility:

```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 Output ulf file to the specified directory (default: .)
-u, --username Username (email) to login Unity (default: $UNITY_USERNAME)
-p, --password Password to login Unity (default: $UNITY_PASSWORD)
-k, --key The authenticator key to login (default: $UNITY_KEY).
-s, --serial Serial key to activate (default: $UNITY_SERIAL). If empty, activate as personal license.
NOTE: Unity Personal Edition is not available to companies or organizations that earned more than USD100,000 in the previous fiscal year.

-d, --debug Display additional log and dump content to 'error.html' on error (default: false)
--headful Run "headful" puppeteer (default: false)
-h, --help Display this message
-v, --version Display version number
```



### Step 1: Get a license request file

Create a license activation file and import license file by command.

```sh
# On Windows:
$ "C:\Program Files\Unity\Editor\Unity.exe" -batchmode -createManualActivationFile

# On macOS:
$ /Applications/Unity/Unity.app/Contents/MacOS/Unity -batchmode -createManualActivationFile
```

Or, with UnityHub (`Settings > License Management > MANUAL ACTIVATION > SAVE LICENSE REQUEST`).

![](https://user-images.githubusercontent.com/12690315/103255736-d4aa8380-49cd-11eb-9701-ff787e38a9f1.png)



### Step 2: Request a license (*.ulf)

Run `unity-activate` to download the `*.ulf` file.

```sh
# For personal license (with interaction):
$ unity-activate ***.alf
$ > enter the username and password
$ username: [email protected]
$ password: *****
...

# For personal license:
$ unity-activate --username [email protected] --password your_password ***.alf

# For professional license (with --serial option):
$ unity-activate --username [email protected] --password your_password --serial your_serial_code ***.alf

# Use environment variables instead of options:
$ export [email protected]
$ export UNITY_PASSWORD=your_password
$ export UNITY_SERIAL=your_serial_code # If empty, activate as personal license.
$ unity-activate ***.alf
```



### Step 3: Activate your license

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 ***.ulf

# On macOS:
$ /Applications/Unity/Unity.app/Contents/MacOS/Unity -batchmode -manualLicenseFile ***.ulf
```

Or, with UnityHub.

![](https://user-images.githubusercontent.com/12690315/103255739-d70cdd80-49cd-11eb-9d18-62600a20085f.png)



### Option: Activate with authenticator key

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 [email protected] --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`
![](https://user-images.githubusercontent.com/12690315/133873890-7bdeb10d-2bde-497b-83e0-2c3586e526ad.png)
- Select `Authenticator App` and click `Next`
![](https://user-images.githubusercontent.com/12690315/133873893-e1894f2b-67d3-4b7a-877f-70c9613cba24.png)
- Click `Can't scan the barcode?`.
Find and save the authenticator key
![](https://user-images.githubusercontent.com/12690315/133878441-19553b38-3bd5-492f-a27a-6974923b4add.png)
- Verify activation with Google Authenticator. You can also verify using a QR code
![](https://user-images.githubusercontent.com/12690315/133878444-0f11a58b-9a4f-4f0e-9856-a33bfa243eaa.png)





## Contributing

### Issues

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

Pull requests are, a great way to get your ideas into this repository.

### Support

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. :)

[![](https://user-images.githubusercontent.com/12690315/66942881-03686280-f085-11e9-9586-fc0b6011029f.png)](https://github.com/users/mob-sakai/sponsorship)





## License

* MIT

## Author

* ![](https://user-images.githubusercontent.com/12690315/96986908-434a0b80-155d-11eb-8275-85138ab90afa.png) [mob-sakai](https://github.com/mob-sakai) [![](https://img.shields.io/twitter/follow/mob_sakai.svg?label=Follow&style=social)](https://twitter.com/intent/follow?screen_name=mob_sakai) ![GitHub followers](https://img.shields.io/github/followers/mob-sakai?style=social)

## See Also

* 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