Create the structure for your own Unity Package Manager (UPM) package by using the Package Manager window.
This process creates the layout and mandatory elements for your package. You can provide other details and elements of your package in later tasks.
This process creates a UPM packageA Package managed by the Unity Package Manager. Refer to Packages.
See in Glossary inside your project folder with the intention of using this package in the current project. However, these instructions also explain what to do if you want to use this package in other (or multiple) projects.
After the domain reloads, the Package Manager window refreshes and shows your package in the list panel and details panel.
You can also view your new package in the Project window, under the Packages
folder.
The package creation operation performs the following actions:
<top-level-domain>.<org-name>.displayname
. This Technical Name maps to the name
property of the package manifest file (package.json
).0.1.0
.package.json
) and populates them with default and placeholder values.If you plan to use this package in another project, or across multiple projects, it’s preferable to move the package out of your project folder.
For information about the differences between placing your package inside or outside your project folder, refer to Comparison of package creation locations.
To move your package out of the current project:
Packages
folder.To use this package in the current project or any other project, you must establish a reference to this package in 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 file. You need to establish this reference only once. Although you can edit the project manifest file (manifest.json
) manually to include a dependencies
value to a local folder, using the Package Manager window is less error prone.
To establish a reference to this package in your project manifest file with the Package Manager window:
package.json
file in that folder.The package appears in the Package Manager window with the Local label.
With the structure of your UPM package complete, you can proceed with other activities in the package development workflow. Typical activities at this stage of package development include: