-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent the bloated official UnityHub from launching automatically? #28
Comments
I am not aware of any way to prevent the official hub from launching other than by deleting it. If you (or anyone else) learns of a way, please let me know. |
I deleted the official hub which works nicely for launching projects without it opening, but unfortunately this seems to make it impossible to use the Asset Store. When I open the Asset Store and click on the My Assets button I get the dialog: Install Unity Hub It might be worth noting in the feature list on the readme page that "Manage Unity licenses" does not imply that one can sign in and use services such as the Asset Store. |
Well, Unity probably makes use of the Hub to fetch the user account's session, in order for the Editor to subscribe the packageManager/AssetStore tab later. but, having the Unity Staff habits in mind, I suspect that data to be located in a file or a Registry key. It's only a matter of locating it and use it. I don't think it would be a good idea to get ride of UnityHub completely, thus encouraging the Staff to eventually come with new ways to obfuscate this data into your computer. Just run HubNative as a complement is good enough. |
i'm interested on this also, found out that if you create special IPC port (same name as hub uses), still chasing it, on how to reply for unity editor, from your dummy IPC port, with the correct authorization-code.. One workaround is also temporarily rename hub.exe, so its easier to enable it back when needed (no need to install/uninstall) |
I use a small python script to start a dummy ipc server, and found this ipc trick useful enough. I switch between offline mode and signed in mode by either start the dummy ipc server or shut it down and let unity hub do it's thing, and because how infrequent I need the asset store, I very much enjoy the de-bloated offline experience. So, in my opinion adding an option for offline vs allow hub is pretty nice. |
@dssste Would you be willing to share your Python script? |
import socket
import os
SOCKET_PATH = "/tmp/Unity-hubIPCService.sock"
if os.path.exists(SOCKET_PATH):
os.remove(SOCKET_PATH)
server = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
server.bind(SOCKET_PATH)
server.listen(1)
print(f"Listening on {SOCKET_PATH}")
try:
while True:
conn, addr = server.accept()
print("Connection received")
data = conn.recv(1024)
print("Received:", data.decode("utf-8"))
conn.close()
except KeyboardInterrupt:
print("\nShutting down...")
finally:
server.close()
os.remove(SOCKET_PATH) It was from chatGPT, and I didn't look into the details as it seems to work just fine (plus I don't know sockets well enough). Also the shell function I use: function unity() {
nohup bash -c "
python3 ~/path/to/main.py &
DUMMY_SERVER_PID=\$!
/Applications/Unity/Hub/Editor/6000.0.27f1/Unity.app/Contents/MacOS/Unity -projectPath \"$1\" &
UNITY_PID=\$!
wait \$UNITY_PID
kill \$DUMMY_SERVER_PID
" > ~/path/to/main.log 2>&1 &
} |
I suspect this may be something that can't be controlled, but I find that what happens is:
I guess this is something on the Unity side, I don't suppose there is anything we can do to prevent it? (I guess I could just delete it! But I'd like to keep it around just in case...)
The text was updated successfully, but these errors were encountered: