Unity License Manual Activation Via Command Lines

Echo Yin
Women in Technology
4 min readOct 28, 2023

[Personal Devlog: October 28, 2023]

The Issue

I recently encountered some issues after the lastest update with Unity Hub. It kept rolling logging icon without futher progress. As what is described in the pictures below. This happened to some other developers as well from time to time.

Unity Hub kept spinning

After some time Unity Hub returned with Critical Error with options to “Report a bug”, “Restart the hub” or “Quit the hub”.

Starting Log Investigation

This is the first I’ve ever had the problem. To understand what the heck was going on with Unity, the best place to look at is info-log. The debug info json file for Unity Hub is located at %Users%/AppData/Roaming/ .

The issue can be detected in info-log.json

As per the log file described, the issue with Unity Hub not opening is due to Unity Hub failed to connect to the server and activate the license needed.

What To Do?

Up until this point Unity Hub still refuses to open. What if I can skip Unity Hub and open Unity Editor directly?

The answer is: we can do that. There’s specific FAQ manual for Unity lisence trouble shooting. The reality is you will encounter more hiccups when trying to walkthrough them step by step.

This is why I write this whole tutorial to help you avoid invisible traps.

The next step is how to activate Unity Editor without the central hub that is specifically utilized to manage Unity License activation.

Activation Steps

If you are like me are in Unity development on Windows 11, there are some changes on applications’ permission and execution level settings that will potentially prevent them from either connecting to network or running some services.

So when switching to running console commands to generate activation license files, make sure to run cmd or powershell as administratror.

Run console commands as administrator

The official Unity documentation has explained how to run command lines in detail: please check them out here. I will add some screenshots for visual leaners below.

  1. Run cmd or powershell as administrator.
  2. Use cd to navigate to the folder where the Unity editor is located. For my case it is in D:\Program Files\Unity Editor\2021.3.26f1\Editor. I failed to run the commands like the manual page instructed, that’s the reason why I resorted switching to the Unity editor directory to execute the commands.

3. The command that worked for me is:

./Unity.exe -batchmode -createManualActivationFile -logfile
The actual command generating .alf file

4. The command will NOT return any logging or messages upon file generation. You will have to check the directory yourself to see if the .alf file is there.

Activation file generated

5. Now go to https://license.unity3d.com/manual to generate a corresponding .ulf file, it should be straightforward and simple to accomplish.

6. Place the generated .ulf file to the same Unity editor directory where the .alf file is.

7. Run the comand (replace the third command argument with the file name you have generated):

 ./Unity.exe -batchmode -manualLicenseFile Unity_v2021.x.ulf -logfile

8. Run Unity.exe directly, it should pop up a dialog window asking for opening a Unity project, and you will be good to go.

Hope this temporary solution helps! Good luck to y’all game devs!

--

--