Skip to main content
Question

Managing Unity3D


Forum|alt.badge.img+2

My company has several application programmers and about a dozen content producer that use Unity3D for designing iOS application and content for those applications. This means that they need to have the Unity IDE installed and maintained on their systems.

My users don't have admin access, and Unity puts out patches weekly that have to be deployed. More annoying is their update requires you download a download agent every week and select which modules you want, and it does a fresh install every time.

Has anyone found a way to manage this through scripts or self service? I have been unable to figure anything out besides downloading and installing it every week onto a VM and using Composer to make a new package. This is very time consuming though.

28 replies

Forum|alt.badge.img+16
  • Valued Contributor
  • 1002 replies
  • February 13, 2016

One thing that can make it a little bit easier.
If you run the download application on a machine all the way through to the end but don't quit it there will be folder in Downloads that contains all the PKG files it pulled down and an INI file describing them.
The moment you quit the Installer they are all deleted, but you can copy them out before this.
You can use these to create an install process without using Composer etc... The INI file appears to list the packages in the order they are to be installed and even has the PKG name as well.
I just pushed all the PKGs down in a DMG and then had a script read the names out of the INI and install them in order.
I'll find it for you when I am back in the office.


Forum|alt.badge.img+16
  • Valued Contributor
  • 1002 replies
  • February 14, 2016

Reads the package names from the URL line of the install.ini described above and installs them in the order in which they appear.

I just placed all the downloaded files into /Library/Scripts/UnityPackages but of course you could use any location that takes your fancy.

#!/bin/bash

for Unity_PKG in $(awk -F"/" '/url=/ {print $NF}' < /Library/Scripts/UnityPackages/install.ini); do
installer -pkg "/Library/Scripts/UnityPackages/$Unity_PKG" -target /
done

rm -rf /Library/Scripts/UnityPackages

Forum|alt.badge.img+8

Thanks much for this tip & script.

Has anyone seen how to automate the last mile of installation (aka user account login and serialization) for macOS? I know people have been asking for this feature so it's something they'll likely release at some point, but the most I found was batch file activations and that was for Windows clients...If anyone has figured this out I would love to hear their solution.


Forum|alt.badge.img+5
  • Contributor
  • 41 replies
  • June 21, 2017

There is a "silent serialization" script that works great when you run it thru ARD, but for the life of me I cannot get it to work in Casper. I even modified it so that it runs as the currently logged-in user (the user running the script has to own a GUI session, so you can't run it as root). If anyone else has solved this problem, I'd really appreciate hearing about it. I do not want to use the "at login" trigger because they're never reliable.

The basic syntax looks like this:

/Applications/Unity/Unity.app/Contents/MacOS/Unity -quit -batchmode -serial R3-XXXX-XXXX-XXXX-XXXX-XXXX -username 'somebody@example.com' -password 'MyPassw0rd'


Forum|alt.badge.img+7
  • Contributor
  • 55 replies
  • September 13, 2017

Have found anybody a solution?


jmahlman
Forum|alt.badge.img+17
  • Valued Contributor
  • 307 replies
  • September 13, 2017

I'm hoping to find a solution to this since I'm going to be installing this in some of our labs.

If I manage to get it working, I'll post something.


jmahlman
Forum|alt.badge.img+17
  • Valued Contributor
  • 307 replies
  • September 18, 2017

Unfortunately, I had to go the manual route (Grab packages, use script, login, ARD and run the batchmode command).

I did do a test to run the batchcommand at login and it did work, but I also don't like login policies that much.


Forum|alt.badge.img+7
  • Contributor
  • 55 replies
  • September 19, 2017

can you send me the batchcommand which you uses for login policies?

I tryed, but by us doesn't work that.


jmahlman
Forum|alt.badge.img+17
  • Valued Contributor
  • 307 replies
  • September 20, 2017

It was the same as above but I made it run when the dock loaded to give it a little buffer:

#!/bin/sh

until [[ $(pgrep Dock) ]]; do
    wait
done

/Applications/Unity/Unity.app/Contents/MacOS/Unity -quit -batchmode -serial R3-XXXX-XXXX-XXXX-XXXX-XXXX -username 'somebody@example.com' -password 'MyPassw0rd'

Forum|alt.badge.img+7
  • Contributor
  • 55 replies
  • September 26, 2017
Executing Policy ActivatingUnity
Running script ActivateUnity...
Script exit code: 139
Script result: 2017-09-26 08:34:59.777 Unity[898:5768] NSDocumentController Info.plist warning: The values of CFBundleTypeRole entries must be 'Editor', 'Viewer', 'None', or 'Shell'.<br/>...270213 bytes written to /var/root/Library/Unity/Certificates/CACerts.pem<br/>/Library/Application Support/JAMF/tmp/ActivateUnity: line 7: 898 Segmentation fault: 11 /Applications/Unity/Unity.app/Contents/MacOS/Unity -quit -batchmode -serial -serial R3-XXXX-XXXX-XXXX-XXXX-XXXX -username 'somebody@example.com' -password 'MyPassw0rd'<br/>
Error running script: return code was 139.

we get this error. How can we solve this?


Forum|alt.badge.img+7
  • Contributor
  • 55 replies
  • January 30, 2018

Hello

I found a solutions. If some instred, let me know. But it is not automatic.

Greetings


jmahlman
Forum|alt.badge.img+17
  • Valued Contributor
  • 307 replies
  • January 30, 2018

<REMOVED>


Forum|alt.badge.img+3
  • New Contributor
  • 2 replies
  • June 14, 2018

Not sure if this will help.
I done some testing with Unity2018.1.2f1 (with an educational license) As described by the user "Look" above, if you attempt an install it (I generally specify an external USB drive as the destination) and while it is downloading the pkg files to the downloads folder, copy them out to an alternative location, then kill the installation. Once you have have obtained all packages, i then use a program called packages, add them to the destination of /private/tmp/, then run a post script to install the packages.
for example:

#!/bin/sh
installer -pkg /private/tmp/Unity.pkg -target /
installer -pkg /private/tmp/StandardAssets.pkg -target /
installer -pkg /private/tmp/1.pkg -target /
installer -pkg /private/tmp/2.pkg -target /
installer -pkg /private/tmp/UnitySetup-Windows-Mono-Support-for-Editor-2018.1.2f1.pkg -target /
installer -pkg /private/tmp/Documentation.pkg -target /
rm -rf /private/tmp/Unity.pkg
rm -rf /private/tmp/StandardAssets.pkg
rm -rf /private/tmp/1.pkg
rm -rf /private/tmp/2.pkg
rm -rf /private/tmp/UnitySetup-Windows-Mono-Support-for-Editor-2018.1.2f1.pkg
rm -rf /private/tmp/Documentation.pkg

I then create a seperate package which just has the one post-install script which contains the following:

#!/bin/sh
/Applications/Unity/Unity.app/Contents/MacOS/Unity -quit -batchmode -serial E3-XXXX-XXXX-XXXX-XXXX-XXXX -username 'your-username@mail.com' -password 'password' || :

Bring both packages into JAMF, with the first package set at a priority of 10, and the licensing part with a priority of 11, throw it into a policy and point it at a group of computers that dont have unity installed.

if you run the command above using ARD, it generally returns a null error, hence i have thrown in the "|| :" at the end so that it returns true anyway. If you run this from JAMF (even without a user logged in at the time), it will create the Unity_lic.ulf file in /Library/Application Support/Unity.

One thing i noticed, If you have the machine bound to AD and a standard network user were to log on and launch Unity, they then become the owner of the Unity_lic.ulf file above, so in theory, they can delete this license file without being prompted for admin credentials. If they do, then the next user that logs in wont be able to launch Unity until it is activated again, so you may want to copy the .ulf file somewhere else when it is created and then script it so it is copied back to its original location upon logout. Havent tested that bit yet!!


Forum|alt.badge.img+1

Just a follow up on this as it may be helpful to some...
I had an error with this on machines I was imaging and despite the install working without issue, they would not license.

It appears the 2018 version when opened created an empty license file in /Library/Application Support/Unity - I just had to add a line in the batch file to license to remove this file - and it all worked.


metalfoot77
Forum|alt.badge.img+11
  • Valued Contributor
  • 76 replies
  • July 16, 2019

I have been testing the latest update to Unity (2019.1.10) that apparently needs the Unity Hub to function. I was able to script the removal of all the old settings and files and package and install the new Unity Hub correctly. Where I am having issues is with licensing. As @RussellCollis mentioned above, it doesn't appear that Unity Hub uses the same licensing structure as the older version did before.

Has anyone been able to get Unity 2019.1.10 (in Unity Hub) running with a personal license? I'm aiming for students to be able to skip logging in and just create projects like they used be able to in previous versions.


Forum|alt.badge.img+1
  • New Contributor
  • 5 replies
  • August 13, 2019

Hi @kricotta do you have copy of the removal script for the old unity settings? Also im working on a new package for 2019.2.0f1 which is appearing to work....

I run the normal install of unity via

#!/bin/bash

for Unity_PKG in $(awk -F"/" '/url=/ {print $NF}' < /private/tmp/UnityPackages/install.ini); do
installer -pkg "/private/tmp/UnityPackages/$Unity_PKG" -target /
done

Then include the unity app within the package just putting it into applications as normal - then using a second pkg to license the app - this was done with educational, but did seem to work in testing..

#!/bin/bash

/Applications/Unity/Unity.app/Contents/MacOS/Unity -batchmode -quit -serial 123-456-789-0 -username 'user@name.uk' -password 'password' || :1

How have you got on?


stephaniemm77
Forum|alt.badge.img+5

ah!! I have been going back and forth with support trying to figure out the licensing! I installed all the apps using Unity Hub...In the past I would use Applications/Unity/Unity.app/Contents/MacOS/Unity -quit -batchmode -serial xx-xxxx-xxxx-xxxx-xxxx-xxxx -username 'software@quinnipiac.edu' -password 'password!'

That def doesn't seem to work anymore when I run that command in terminal I just get not such file or directory...support just keeps hitting me with the canned responses referring to the documentation out there already. I will let you know if they give me anything more. We are using an EDU license but still running into the same issues!


stephaniemm77
Forum|alt.badge.img+5

So here was my response from Unity

Hello Stephanie

Thank you for reaching us, hope you are having a good day.

I apologize.

This process only works for Unity version 2018 and all previous versions, after deleting the Unity hub you´ll be able to make a command line activation

This is the folder you´ll need to delete

C:Users<user>AppDataRoamingUnityHublogs folder

For 2019 versions, command line activation is not available, you´ll need to do a manual activation on each computer.

You can see the steps on this link

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


mgshepherd
Forum|alt.badge.img+10
  • Contributor
  • 58 replies
  • August 22, 2019

What...did I just read that for the 2019 version we'll have manually activate each machine? Oh geez...


Forum|alt.badge.img+8
  • Valued Contributor
  • 96 replies
  • August 22, 2019

mgshepherd, I just completed a remote installation that was successful in my test environment. I'm working on documentation and will share once I have it all worked out.


Forum|alt.badge.img+11
  • Valued Contributor
  • 324 replies
  • September 3, 2019

They appear to have pulled a blinder with this software now because of the stupid Unity Hub that wasn't on there before.

Even if you manage to activate it (whic I have a working automated method for) it then creates the licence file as that user with other users only having read access to it. If you then set 777 on this file and login with a different user it deletes the file and then creates a new one again with ownership set to that user and everyone else read only. The knock on effect of this is that every other user will get a box come up asking for administrator permissions to change Unity Hub when they open Unity.

The file is /Library/Application Support/Unity/Unity_lic.ulf


Forum|alt.badge.img+8
  • Valued Contributor
  • 126 replies
  • September 4, 2019

depending on your licensing we run this:
/Applications/Unity/Unity.app/Contents/MacOS/Unity -quit -batchmode -nographics -serial -username ‘’ -password ‘*’ || :

this seems to fail using jamf remote but works fine using Apple Remote Desktop
this will license all users for Unity for the device...... its been a while since we have done it but I am sure this what we did ;)


Forum|alt.badge.img+11
  • Valued Contributor
  • 324 replies
  • September 4, 2019

@BOBW The licensing side works fine, the issue seems to be the ownership of the lic file. Unity 2018 was fine but 2019 needs the Unity hub part and that seems to cause complications.


Forum|alt.badge.img+11
  • Valued Contributor
  • 324 replies
  • September 4, 2019

Looking into this a bit further and I can't figure out the issue. The lic file gets its ownership changed successfully but each user still gets the "Unity Hub wants to make changes" popup asking for an admin password. I can't figure out what it's trying to change as I've given both the Unity and Unity Hub apps full permissions for all users.


Forum|alt.badge.img+11
  • Valued Contributor
  • 324 replies
  • September 4, 2019

I think I've got this all working by using the Outset tool to run a script on each login (privileged) that does a chmod 777 on the "/Library/Application Support/Unity/Unity_lic.ulf" file. This then allows teh next user to launch it without getting a prompt for admin password.

I also added the -nographics onto the activation command which seems to them make it work properly when using Jamf Remote etc.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings