- Home /
Can I enter my license key via command line?
I'm trying to install Unity on a remote Mac server via command line, and I have a Unity Pro license key that I'd like to activate.
Answer by Graham-Dunnett · Jul 18, 2014 at 09:02 PM
Activation needs to happen using the GUI. There is no command-line based activation possible.
How is it done on servers that do not have a graphics card?
i tried many times for syntax: unity -quit -batchmode -nographics -execute$$anonymous$$ethod Build.buildAndroid -username mymail@gmail.com -password mypass -serial XXXXX-YYYY-$$anonymous$$Y-SERIAL but all of them failed with below error message after 1$$anonymous$$ute: DisplayProgressbar: Unity license Cancelling DisplayDialog: Failed to activate/update license. Timeout occured while trying to update license. Please try again later or contact support@unity3d.com This should not be called in batch mode.
How is this "best answer?" The documentation states that there is, in fact, a command-line based activation method: Unity Command Line Documentation
However, neither activation or return works:
So the "best answer" would be an explanation of why neither of these documented functions actually functions....
Answer by Tak · Jan 19, 2016 at 12:32 PM
http://docs.unity3d.com/Manual/CommandLineArguments.html indicates that it's possible.
Is it or not possible to activate Unity3D through command line ?
Answer by ENG-SCM · Dec 11, 2017 at 11:34 PM
With Unity 5.5.3f1 I was able to get this to work:
"c:\program files\Unity5.5.3f1\Editor\Unity.exe" -quit -batchmode -nographics -serial <key> -username "<username>" -password "<password>"
Also, returning the license via command line worked:
"c:\program files\Unity5.5.3f1\Editor\Unity.exe" -quit -batchmode -nographics -username "<username>" -password "<password>" -returnlicense
I was unable to get either to work under 5.1.1f1. The company I work for has to manage over 50 licenses across about as many automated build machines so this is a critical feature - especially when the build machines randomly "lose" licensing and need to be reactivated for no apparent reason.
Your answer
Follow this Question
Related Questions
Activate Unity license from CLI for CI 1 Answer
Unity Command Line Fails to Get license 1 Answer
Running Unity Pro features and connecting to asset server without a Pro license 1 Answer
can i use a bought texture in an asset pack im creating? 1 Answer
Redistribute Standard Assets and/or free Unity Assets as part of my AssetStore Product? 0 Answers