Unity uses a package manifest file (package.json
) to manage information about a specific version of a specific package. The package manifest is always at the root of the package and has crucial information about the package, such as its registered name and version number.
The package manifest also defines useful information to communicate to the user, such as:
The package manifest uses JSON (JavaScript Object Notation) syntax to describe what’s inside the package. The file’s format is similar to npm’s package.json
format, but uses different semantics for some of its properties. Refer to the example for a sample package manifest file.
The Package Manager reads this manifest to find out the package’s contents, how to unpack its contents, and what information to display in the Package Manager window. The manifest stores this information in a series of required, recommended, and optional properties.
If these properties aren’t present, either the registry refuses the package when it’s published, or the Package Manager can’t fetch or load the package.
Property | JSON Type | Description |
---|---|---|
name | String | A unique identifier that conforms to the Unity Package Manager naming convention, which uses reverse domain name notation. For more information about the naming convention, refer to Naming your package. Note: The name identifier is different than the user-friendly display name that appears in the list panel in the Package Manager window. |
version | String | The package version number, which uses the format "major.minor.patch" . For example, "3.2.1" indicates that this is the 3rd major release, the 2nd minor release, and the 1st patch. This value must respect Semantic Versioning. For more information, refer to Versioning. |
The Package Manager can install packages in a project even if the recommended properties are missing or have invalid values.
However, the recommended best practice is to assign values for these properties to make sure that your package is discoverable and to offer a better experience for users.
Property | JSON Type | Description |
---|---|---|
description | String | A brief description of the package. This is the text that appears in the details panel of the Package Manager window. This field supports UTF–8 character codes. This means that you can use special formatting character codes, such as line breaks (\n ) and bullets (\u25AA ). |
displayName | String | A user-friendly name that appears in the Unity Editor (for example, in the Project window, the Package Manager window, etc.). Examples of displayName values are Unity Timeline, ProBuilder, and In App Purchasing. |
unity | String | Indicates the lowest Unity version the package is compatible with. If omitted, the Package Manager considers the package compatible with all Unity versions. The expected format is "major.minor" (for example, "2018.3" ). Unity 6 and later versions follow the same "####.#" format. For example, the technical version number for Unity 6 is "6000.0" .To point to a specific patch, also include the unityRelease property, described in Optional properties.Note: A package that isn’t compatible with Unity doesn’t appear in the Package Manager window. |
These properties are optional, meaning that you can omit them. However, if they’re present, they must have a valid value.
Property | JSON Type | Description |
---|---|---|
author | Object or string | The author of the package. This property supports only one author. This property has one required field, name, and two optional fields, email and url. You can specify these fields as a JSON object, or collapse them into a single string whose key is author. Object example: { "name" : "John Doe", "email" : "john.doe@example.com", "url" : "http://john.doe.example.com/" } String example: "John Doe <john.doe@example.com> (http://john.doe.example.com/)"
|
changelogUrl | String | Custom location for this package’s changelog specified as a URL. For example:"changelogUrl": "https://example.com/changelog.html" Note: When the Package Manager can’t reach the URL location (for example, if there is a network issue), it does the following: - If the package is installed, the Package Manager opens a file browser displaying the CHANGELOG.md file in the package cache. - If the package isn’t installed, the Package Manager displays a warning that an offline changelog isn’t available. |
dependencies | Object | A map of package dependencies. Keys are package names, and values are specific versions. They identify other packages that this package depends on. Note: The Package Manager doesn’t support range syntax, only SemVer versions. |
documentationUrl | String | Custom location for this package’s documentation, specified as a URL. For example:"documentationUrl": "https://example.com/" Note: When the Package Manager can’t reach the URL location (for example, if there is a network issue), it does the following: - If the package is installed, the Package Manager opens a file browser displaying the Documentation~ folder in the package cache. - If the package isn’t installed, the Package Manager displays a warning that offline documentation isn’t available. |
hideInEditor | Boolean | By default, the Project window hides package’s assets and omits them from the results when you use the Object Picker in the Inspector window. Set this property to "false" to make sure that this package’s assets are always visible. |
keywords | Array of Strings | An array of keywords used by the Package Manager search APIs. This helps users find relevant packages. |
license | String | Identifier for an OSS license using the SPDX identifier format, or a string such as “Refer to LICENSE.md file”. Note: If you omit this property in your package manifest, your package must contain a LICENSE.md file. |
licensesUrl | String | Custom location for this package’s license information, specified as a URL. For example:"licensesUrl": "https://example.com/licensing.html" Note: If the Package Manager can’t reach the URL location (for example, if there is a network issue), it does the following: - If the package is installed, it opens a file browser displaying the LICENSE.md file in the package cache. - If the package isn’t installed, the Package Manager displays a warning that offline license information isn’t available. |
samples | Array of Objects | List of samples included in the package. Each sample has a display name, a description, and the path to the sample folder starting at the Samples~ folder:{ "displayName": "<name-to-appear-in-the-UI>", "description": "<brief-description>", "path": "Samples~/<sample-subfolder>" } For more information, refer to Creating samples for packages. |
type | String | Reserved for internal use. |
unityRelease | String | Part of a Unity version indicating the specific release of Unity that the package is compatible with. You can use this property when an updated package requires changes made during the Unity alpha/beta development cycle. This might be the case if the package needs newly introduced APIs, or uses existing APIs that have changed in a non-backward-compatible way without API Updater rules. The expected format is "<update><release> (for example, "0b4" ). Note: If you omit the recommended unity property, this property has no effect. A package that isn’t compatible with Unity doesn’t appear in the Package Manager window. |
{ "name": "com.[company-name].[package-name]", "version": "1.2.3", "displayName": "Package Example", "description": "This is an example package", "unity": "2019.1", "unityRelease": "0b5", "documentationUrl": "https://example.com/", "changelogUrl": "https://example.com/changelog.html", "licensesUrl": "https://example.com/licensing.html", "dependencies": { "com.[company-name].some-package": "1.0.0", "com.[company-name].other-package": "2.0.0" }, "keywords": [ "keyword1", "keyword2", "keyword3" ], "author": { "name": "Unity", "email": "unity@example.com", "url": "https://www.unity3d.com" } }
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.
When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.
More information
These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising. Some 3rd party video providers do not allow video views without targeting cookies. If you are experiencing difficulty viewing a video, you will need to set your cookie preferences for targeting to yes if you wish to view videos from these providers. Unity does not control this.
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.