Unity Hub terminal Activation

stephaniemm77
Contributor II

Hi Folks,

So we use Unity Hub in our classroom, I have always been able to activate for multiuser's by running.

https://docs.unity3d.com/Manual/ManagingYourUnityLicense.html

 

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

When I run it, it looks like it works, but when I log in as another user it is not activated.

I verified that the path exists, if anyone has any advice id be grateful Unity support has a 30 day wait time for a response (I am not kidding I put in a ticket over 2 weeks ago)

6 REPLIES 6

lensteruk
New Contributor II

Hi there. We are just going through the same issue. It was working fine but now fails. Let’s tag up and see if we can fix this. 

bbarciz
Contributor

Hi,

Did you two have any success with this?  I am doing the same thing and am having intermittent success.  It works on 3 computers but fails to activate the license on 2.  That kind of thing.  Just curious as I don't believe I had this issue at all last time around with this product.

Thanks!

dlondon
Valued Contributor

I have almost the same script that is running via a policy and set to run once per computer at login.  Here's the script:

 

 

#!/bin/bash
# Unity-EducationGrantLicence.bash
# 2021-07-15 David London
# To renew, google unity education grant and if using my credentials it's just a quick process to renew.  The license code so far has been the same

if [ -e "/Applications/Unity/Unity.app/Contents/MacOS/Unity" ];then
   /Applications/Unity/Unity.app/Contents/MacOS/Unity -quit -batchmode -serial my-serial-here -username 'my-username-here' -password 'my-password-here' || :
   echo "Unity Education Grant License assigned"
else
    echo "/Applications/Unity/Unity.app/Contents/MacOS/Unity was NOT found"
fi

 

 


And just in case someone calls me in the middle of a class saying it's not licensed, I also have a Self Service item that removes the Unity license and then re-runs the above script.

Note: the user (student) still needs to log in with their own Unity account but the Hub has been licensed using the above script.

I also get varying behaviours with different versions.  We are currently on UnityHub3.8.0 and Unity-2022.3.26f1-LTS-ARM64

Thank you for sharing! I have the command line running during the file and processes part of my current Jamf policy that installs Unity and the Hub software.  I wonder if separating it out will make a difference.  Do you know if your results have been better having it run when a user is logged in?

Just as an FYI, there is a way not to require login to the Hub software.  Just in case you were not aware or did not want them to log in. 

Thanks!

dlondon
Valued Contributor

Hi @bbarciz I've noticed that when I run the script there is a momentary blip from Unity in the dock.  In my experience that indicates code is being run in the App (which we knew anyway).  But, I'm fairly sure that this behaviour indicates that it must run when someone is logged in.

* Could you give some info on the way not to require login to Hub?  It would be nice for that to be optional.

Thanks @dlondon !  That is interesting that having a user logged in may help!

This link should take you to the page with the info about configuring the login to the Hub - https://learn.unity.com/tutorial/activating-your-education-grant-license-egl#633c7d2dedbc2a27f682e7b...  It is step 5 if the link does not jump you directly to that page.  I did not implement the "HubDisableSignin" so that the option is still there for them to log in, they just don't get forced.

Thanks!