This section provides information on the following issues:
You can also run the Unity Package Manager Diagnostics tool if you are experiencing problems that might be network-related. For more information, see Network issues.
The Package Manager displays error indicators in the Package Manager window when it encounters problems:
Error messages that appear in the status bar indicate the Package Manager has detected an issue that is not related to a specific package. For example, if the Package Manager cannot access the package registry server, it displays this message in the status bar:
If your network cannot reach the package registry server, it is probably because there is a connection problem with the network. When you or your system administrator fix the network error, the status bar clears.
If a specific package has a problem when loading or installing (for example, when determining which package versions to load), the error icon () appears in the package list next to the compromised package (A). To find out what the problem is, open the compromised package’s details view to see the detailed error message (B):
package.manifest file is malformed, an error similar to this appears in your Unity console:
Failed to resolve packages: The file [<project-path>/Packages/manifest.json] is not valid JSON: Unexpected token '}' at 44:1 }
You can use the information contained in the error message to fix the JSON. There are a number of online validators that you can use to try to correct the problem. Once you save the corrected file, Unity reloads the Package Manager window.
As of 2019.3, your
package.manifest file should not contain any references to the com.unity.package-manager-ui package. You can either reset your Project’s package configuration or remove the following line from the manifest’s dependencies list:
If the Package Manager window is still missing, then restart Unity.
If you are still experiencing problems, check to see if your Project manifestEach Unity Project has a Project manifest, which acts as an entry point for the Package Manager. This file must be available in the
<project>/Packages directory. The Package Manager uses it to configure many things, including a list of dependencies for that Project, as well as any package repository to query for packages. More info
See in Glossary uses “exclude” as a package version. This is an obsolete value for the dependencies attribute. If you find any lines like these, remove the entire line. Package Manager only installs packages that are explicitly included as a dependency in your Project, so once you remove that entry, Package Manager ignores the package and doesn’t install it.
When you upgrade a Project to a newer Unity version, the Package Manager automatically updates incompatible packages to newer compatible versions. However, if your package doesn’t compile, the Package Manager displays error messages in the Console.
To correct these messages, read the error messages and fix any problems you can. For example, a package might be missing a dependency on another package or version. In that case, you can try and install the package yourself.
You can also try the following sequence of solutions until you find something that works:
Packagesfolder under your Project.
Packagesfolder, leaving only the
manifest.jsonfile. Then try to reload the Project.
Library/PackageCache/com.unity.package-manager-ui@<version>folder in the failing Project with the same folder from the newly created Project.
If you are trying to install a new package from the registry and it is not working, it might be due to permission problems.
You must have full permissions on the cache folder:
Sometimes institutional environments, such as schools, government offices, or network-protected workplaces set up proxy servers to control traffic between the network and the Internet, and use their own server certificates which are not recognized by Unity or the Package Manager. Talk to your network administrator.
If you see a lot of compilation errors, this might indicate that Unity is not recognizing the packages in your existing Project. In this case, you might be missing a .NET component.
Download and install the .NET SDK v2.2.101 component.
Install any recommended updates in Visual Studio
Use homebrew to brew and install mono:
brew update brew install mono # optional brew upgrade mono
If necessary, delete the
Library/obj/temp folder under your Project and restart Unity.
If you are still experiencing difficulties, try rebooting your computer as well.
If the Console reports that the
hostfxr.dll library was found, but Unity failed to load it from
C:\<path_to_app>\hostfxr.dll, you can fix this error on Windows 7 or Windows Server 2008 R2 by installing both KB2999226 and KB2533623 patches.
If a Project has too many package issues, you can reset your Project back to the default package configuration for the Editor’s version of Unity. This operation resets all packages in your Project. This might not fix the source of the problem, but it can help you figure out what the problem is.
Note: You can’t undo resetting your package configuration, so make sure you back up the
manifest.json file first or make sure your Project is under source control. You can also take extra precautions by cloning your Project and testing out the operation on the clone before proceeding.
To return to the default package configuration, select Reset Packages to defaults from the Help menu.
You can also test the return to the default packages before you perform the final change:
Clone your Project by copy-pasting your Project folder and renaming it so that it is easy to find (for example, if your Project is called
MyProject then you could use something like
Load your newly cloned Project.
From the Help menu, select Reset Packages to defaults.
Depending on the size of your Project, this might take a few minutes.
Check that it successfully reset the packages. If so, you can perform the operation safely on the original Project.
If you are using the SSH protocol to install a package by Git URL, you might get an authentication error from Git, even if you are running an ssh-agent in the background and your PID environment variables are set properly.
While your script can successfully start the ssh-agent in the background, the exported environment variables are only available to the Bash shell running the script and to any child process it launches from that point on. This is because your script cannot change environment variables from parent processes, unrelated processes, or previously created child processes. And even if the script is located in
.bashrc, it only gets executed in Bash shells.
When you launch Unity or the Unity Hub (both in Windows and macOS) by double-clicking the Unity icon or using the Hub, it is not running in a shell, so the script is not executed. This means that the Unity Editor process doesn’t have these variables set, so ultimately the Git process invoked by Unity doesn’t have them either.
To solve this issue, you can either:
# Expose env variables to native windows setx SSH_AGENT_PID "$SSH_AGENT_PID" setx SSH_AUTH_SOCK "$SSH_AUTH_SOCK"