Unity Hub Will Block Mac Shut Sown Process

If I leave Unity Hub Open and try to shut down my computer, Unity Hub won’t close as other programs do and will stop Mac from shutting down, even if there is no activity going on. I’m not sure if it’s as designed or an oversight, but it feels like the latter.

5 Likes

Same on MacOS Sonoma 14.4.1 (MacBook PRO 16" M2 MAX)

Same here. MacOS 14.4.

There’s a bug on the tracker that was marked as “Won’t fix” recently.

Why are they refusing to fix this glaring issue? They don’t even explain why they’re not going to fix it.
At this point I’m just going to download updates directly from the Unity website.

1 Like

I talked to Unity support and I was told that the Hub team has 3 freaking people on the team. Holy crap I feel bad for them, I work at a school in software as my day job, and even we have 5 people on our team.
Totally makes sense that they’re prioritizing other problems.

1 Like

I believe this affects a significant number of MacOS users, and it’s a highly frustrating bug. They should take action in the future (they can’t refuse), regardless of the size of the team or the individual team members’ ability to resolve the issue. Additionally, I believe the manager who hired max 3 people may be responsible for this bug, which is not a “Unity” mindset.

1 Like

Same on MacOS 14.6.1

1 Like

OP here, switched accounts.

I used ChatGPT to generate a trick that works for me. I gave it the prompt “logout,” but it should also work for shutdown and restart. I’ve personally tested logout and restart, and both worked fine. The “Create and Configure logout.sh Script” step doesn’t necessarily require using the nano editor, you can use whichever editor you’re comfortable with. Also, you don’t have to put the shell script in /usr/local/bin, but the chmod and sudo defaults steps definitely need to be done in the terminal—no way around that.


Create the AppleScript

  1. Open the Script Editor application.
  2. In Script Editor, create a new document and enter the following code to quit Unity Hub:
tell application "Unity Hub" to quit
  1. Save this AppleScript file as CloseUnityHub.scpt and save it to a convenient location, such as your Documents folder.

Create and Configure logout.sh Script

  1. Open Terminal.
  2. Enter the following command to create a new logout hook script:
sudo nano /usr/local/bin/logout.sh
  1. In the nano editor, enter the following content to invoke the AppleScript created in the previous step:
#!/bin/bash
osascript /path/to/your/CloseUnityHub.scpt

Replace /path/to/your/CloseUnityHub.scpt with the actual path where you saved the AppleScript file.
4. Save and exit the nano editor (press Ctrl+X, then Y to confirm save, and Enter to exit).
5. Make the script file executable:

sudo chmod +x /usr/local/bin/logout.sh
  1. Then set the script as the logout hook script:
sudo defaults write com.apple.loginwindow LogoutHook /usr/local/bin/logout.sh

Verify the Setup

  1. Log out of your Mac account.
  2. Log back in and verify that the Unity Hub process has been correctly closed during logout.

This approach uses AppleScript to quit Unity Hub, which should avoid permission or dependency issues and ensure that the Unity Hub process is successfully closed during logout.

Not sure how you got this to work but the logout hook doesn’t even run until all applications are closed. It runs just before it actually logs out. I tried your method, and it still waits for me to forcibly close Unity Hub.

Same issue here, it looks like the hub process needs to be killed twice to avoid it. I used GitHub - freedev/macosx-script-boot-shutdown: This project is useful to execute a shell script during Mac OS X boot or shutdown. to call “killall Unity Hub” a couple of times.

1 Like

It appears to be working fine now, I’m able to reboot without force closing Unity Hub on the lastest 3.11.0 beta. Thank you Hub dev team.