Package Manager window
Use the Unity Package Manager (in Unity’s top menu: Window > Package Manager) to view which packages and feature sets are available for installation or already installed in your project. In addition, you can use this window to see which versions are available, and install, remove, disable, or update packages and feature sets for each project.
The Package Manager window
The Package Manager window displays:
(A) The experimental package indicator, which warns you if your project contains experimental packages.
(B) The add button, which you can click to install a package directly into your project by entering a git URL, a local path, or a package name.
(C) The Packages drop-down menu, which you can use to change what appears in the list (context).
(D) The Sort drop-down menu, which lets you sort the list of packages and feature sets by name or date.
For Asset Store A growing library of free and commercial assets created by Unity and members of the community. Offers a wide variety of assets, from textures, models and animations to whole project examples, tutorials and Editor extensions. More info
See in Glossary packages, two additional controls give you some additional filtering options:
The Filters drop-down menu and the Clear Filters button allow you to narrow down which Asset Store packages appear in the list
(E) Advanced settings , which you can use to access the project settings A broad collection of settings which allow you to configure how Physics, Audio, Networking, Graphics, Input and many other areas of your project behave. More info
See in Glossary for the Package Manager or reset your project’s packages and feature sets to default.
(F) The search box, which you can use to look for packages and feature sets by name.
(G) The list view, which displays all packages that match the filter and search parameters you specify.
(H) The detail view, which displays information specific to the feature set or package A container that stores various types of features and assets for Unity, including Editor or Runtime tools and libraries, Asset collections, and project templates. Packages are self-contained units that the Unity Package Manager can share across Unity projects. Most of the time these are called packages, but occasionally they are called Unity Package Manager (UPM) packages. More info
See in Glossary selected in the list. For example, if a feature set is selected, the information specific to the feature set appears, including which packages it contains.
(I) The status bar, which displays information when Package Manager loads packages and feature sets. This includes errors and warning messages, the number of Asset Store packages available, and a link to load more Asset Store packages.
(J) The reload drop-down menu, which lets you force Package Manager to reload or resolve the packages in your project.
(K) Buttons to perform any of the following actions:
Advanced settings
The advanced settings drop-down menu allows you to perform these actions:
Status bar
The Package Manager displays messages in the status bar at the bottom left of the Package Manager window.
There are typically four status messages that you might see:
The first time you open the Package Manager window in a new project, the Refreshing packages message appears briefly:
Loading packages message
This message also appears when you select Refresh list from the reload drop-down menu.
When you are using the My Assets context, the load bar appears above the date. It displays the number of Asset Store packages and a Load link:
Most of the time the status bar displays the date and time of when the Package Manager window last refreshed its information. However, if the Package Manager detects a problem, such as a missing network connection, the Package Manager displays an error in the status bar:
If your network connection is working, but you are not signed into your Unity account, the Package Manager doesn’t display any Asset Store packages. When you try to use the My Assets context, the Package Manager displays an error in the status bar:
Logged out of Unity account
In the list view, click the Sign in button to sign into your Unity account through the Unity Hub.
For information on how to resolve these errors and more, see Error messages.
Менеджер пакетов Unity
Пакет – это контейнер, в котором хранятся различные типы функций или ресурсов, например:
- Инструменты и библиотеки для редактирования, такие как текстовый редактор, средство просмотра анимации или тестовые среды.
- Инструменты и библиотеки среды выполнения, такие как Physics API или конвейер графики.
- Коллекции объектов, например текстуры или анимации.
- Шаблоны проектов для обмена общими типами проектов с другими.
Пакеты предоставляют широкий спектр улучшений для Unity с помощью диспетчера пакетов. В редакторе вы можете получить доступ к окну диспетчера пакетов через это меню: Window > Package Manager.
Примечание. Диспетчер пакетов также поддерживает просмотр любых пакетов Asset Store, которые вы уже загрузили или импортировали из Unity Магазин ресурсов Расширяющаяся библиотека бесплатных и коммерческих ресурсов, созданных Unity и членами сообщества. Предлагает широкий спектр ресурсов, от текстур, моделей и анимации до целых примеров проектов, руководств и расширений редактора. Подробнее
См. в Словарь .
Как Unity работает с пакетами
Когда Unity открывает проект, диспетчер пакетов Unity читает манифест проекта Каждый проект Unity имеет манифест проекта, который действует как точка входа для диспетчера пакетов. Этот файл должен находиться в каталоге
/Packages . Диспетчер пакетов использует его для настройки многих вещей, включая список зависимостей для этого проекта, а также любой репозиторий пакетов для запроса пакетов. Подробнее
См. Словарь (1), чтобы понять какие пакеты загружать в Project. Затем он отправляет запрос (2) на сервер реестра пакетов (3) для каждого пакета, который отображается как зависимость
См. в Словарь в манифесте. Затем реестр пакетов отправляет запрошенную информацию и данные обратно диспетчеру пакетов (4), который затем устанавливает эти пакеты (5) в проект. У каждого проекта есть собственный манифест, в котором перечислены пакеты для загрузки в качестве «зависимостей» проекта.
Как менеджер пакетов Unity устанавливает пакеты
Если вы хотите включить пакет в свой проект, вы должны обновить манифест проекта, чтобы включить его в список зависимостей. Если вы хотите, вы можете изменить манифест проекта напрямую, но безопаснее и проще позволить это сделать диспетчеру пакетов. Дополнительные сведения об использовании пользовательского интерфейса см. в документации к окну диспетчера пакетов.
Как использовать диспетчер пакетов
Диспетчер пакетов использует три интерфейса для связи с пользователями, манифестами и реестрами:
Tutorial: Working with Custom Packages in Unity
Sharing common functionality and library between projects is always a problem when it comes to Unity projects. Some may try to use git submodule combined with symbolic links, but somehow it seems not a decent solution. Now Unity provides the package manager like npm or those in other fields. I believe it’s a better way to solve the problem.
This tutorial will guide you creating, developing and sharing custom packages in Unity.
Creating Packages
The following is the layout convention followed by official Unity packages. Note that packages aren’t Unity projects on their own. They have to be imported to a project during development, which will be mentioned later in the tutorial.
For example, if the company name is “CoolCompany”, package name is “GreatPackage”, so the runtime assembly definition ( *.asmdef ) will be named CoolCompany.GreatPackage.asmdef .
There are some files we need to create for the custom package later, including package.json and *.asmdef .
package.json
package.json is the package manifest file similar to npm’s. This manifest should always be placed at the root of your package. Unity package manager reads package.json to find out what the package is, such as name, version and dependencies.
Here is a sample package.json with recommended fields, please adapt this to your package:
The format of the package name is com.companyname.packagename .
The value in version field must follow semantic versioning with format major.minor.patch ; otherwise, it will break the strategy that automation tools use to check the compatibility. major is for breaking changes, minor is for backward-compatible API changes, and patch is about fixes with no API changes. When major is 0, it indicates this package isn’t stable for production, may includes many breaking changes frequently. The initial version of packages should be 0.1.0 .
As packages for Unity, use label preview in version will let package manager know it’s in preview, e.g. 1.2.3-preview.1 , 1.2.3-preview.2 .
Specify the dependencies of the package in the dependencies field. These referenced packages will be imported automatically when developers import this package. Please check out npm documentation for detailed syntax about specifying version ranges, but not all the syntax are tested on Unity.
In Unity 2020.1 and later, package manager groups packages by author name :

Check out the official documentation of package.json for more details.
Assembly Definitions
Starting from Unity 2017.3, Assembly definitions provide a way to separate your scripts into different assemblies. Each of them acts as a library within the Unity project and has its own dependencies on other assemblies. Unity reduces compilation time by only rebuilding the affected assemblies instead of whole project when you make a change. Unity’s package manager fully relies on these assembly definitions. Here is an in-depth guide for assembly definitions in Unity.
Arranging all scripts into assembly definitions is required for packages. Assembly definitions will include all scripts in that folder and its subfolders, except for the subfolders with their own assembly definitions.
Since assembly definitions are plain text files, you can either create them with your favorite text editor or with Unity editor through the Create dropdown menu.