Make sure the Unity Package Manager can access the following domain names using HTTPS:
Add the above domain names to your firewall’s whitelist.
When using a proxy server, configure the HTTP_PROXY
and HTTPS_PROXY
environment variables for the Unity Package Manager to use when performing requests against the Unity package registry.
You can set these variables globally (either system or user variables) according to your operating system. Alternatively, you can set them only for the Unity Hub when it launches.
In some corporations and institutions, users are behind a firewall and can only access the internet through a proxy. Some proxies unpack the HTTPS content and repack it with its own self-signed certificate. Unity Package Manager’s underlying HTTPS layer rejects these self-signed certificates because it does not recognize them, and treats the connection as a possible man-in-the-middle attack. This means that you can’t use the Package Manager in Unity if your proxy uses a self-signed certificate.
This section provides instructions for creating a command file you can run from a Windows command prompt or a macOS or Linux terminal. Alternatively, you can copy and paste the commands directly into the prompt or terminal window.
NOTE: Before you run the command file, shut down the Hub completely. If the Hub is already running, the script switches focus to the Hub without relaunching, so it does not apply the changed proxy settings.
These instructions create a command file on Windows.
The file launches the Hub with the environment variables set. You can either double-click the file, or invoke it from the command prompt. Unity passes these environment variables on to any Unity Editor process launched from the Hub.
Open a text editor such as Notepad.
Enter the following text, replacing proxy-url with the correct proxy server URL and adjusting the Hub install path if needed:
@echo off
set HTTP_PROXY=proxy-url
set HTTPS_PROXY=proxy-url
start "" "C:\Program Files\Unity Hub\Unity Hub.exe"
NOTE: If there are spaces in the path, you must use double quotes around the path to the program.
Save the file to a location where you can easily find it (such as the Desktop
), and make sure the file has the .cmd
(for example, launchUnityHub.cmd
).
These instructions create the launchUnityHub.command
file on macOS.
The file launches the Hub with the environment variables set. You can either double-click the file, or invoke it from a Bash terminal. Unity passes these environment variables on to any Unity Editor process launched from the Hub.
NOTE: Double-clicking the command file opens a Terminal window or tab and leaves it open, even after the script finishes. You can change this behavior in the preferences for the Terminal.app.
Open a Terminal window.
Enter the following script, replacing proxy-url with the correct proxy server URL and adjusting the Hub install path if needed:
echo '#!/bin/bash
export HTTP_PROXY=proxy-url
export HTTPS_PROXY=proxy-url
nohup "/Applications/Unity Hub.app/Contents/MacOS/Unity Hub" &>/dev/null &' > launchUnityHub.command
chmod +x launchUnityHub.command
NOTE: If there are spaces in the path, you must use double quotes around the path to the program.
Move the launchUnityHub.command
file to a convenient location (for example, the Desktop
), if you prefer.
Did you find this page useful? Please give it a rating: