The package manifest (package.json
) defines the metadata for a Unity Package Manager (UPM) package, including its registered name, version, dependencies, Unity Editor compatibility, and other configuration details. The Unity Editor uses this file to identify, load, and manage the package within the project.
You can view or edit the package manifest depending on the context:
For all packages, including immutableYou cannot change the contents of an immutable (read-only) package. This is the opposite of mutable. Most packages are immutable, including packages downloaded from the package registry or by Git URL.
See in Glossary packages, you can view most of the package manifest’s properties directly in the Unity Editor:
Open the Package Manager window.
Select a package from the list panel.
Use one of the following methods to access the InspectorA Unity window that displays information about the currently selected GameObject, asset or project settings, allowing you to inspect and edit the values. More info
See in Glossary window:
The Inspector window displays information about the package, which it reads from the package manifest file (package.json
).
To view all fields, including ones not shown in the Inspector window, open the package.json
file with one of the following methods:
package.json
in the script editor defined in Preferences > External Tools.
You can locate the package.json
file to view the complete contents of the package manifest. If the package is mutableYou can change the contents of a mutable package. This is the opposite of immutable. Only Local packages and Embedded packages are mutable.
See in Glossary, you can also edit the file.
You can use several methods to locate the manifest file.
package.json
) highlighted.package.json
and select Open. You can also select Show in Explorer (Windows) or Reveal in Finder (macOS), then open the file manually.
Packages
subfolder, then go to your package’s subfolderpackage.json
file with your preferred script editor.With the package.json
file open, refer to the package manifest reference to identify the different fields and their usage.
If you’re developing a UPM package or customizing a registry package you copied into your project, follow these steps when you need to make changes to the manifest file.
You can use several methods to edit the manifest file.
Open the Package Manager window.
Select your package from the list panel.
From the details panel, select the Manage dropdown button and select Edit Manifest.
Note: You can also manually open or change to the Inspector window and select Edit.
Make your changes while referring to the package manifest reference.
Note: If you change the Name field in the Inspector window, changes replace only the final identifier in the name
property of the package manifestEach package has a manifest, which provides information about the package to the Package Manager. The manifest contains information such as the name of the package, its version, a description for users, dependencies on other packages (if any), and other details. More info
See in Glossary file.
Select Apply to save your changes.
If fields you need to edit aren’t available in the Inspector window, use the manual method for editing the manifest file in a script editor.
package.json
file opens in the script editor defined in Preferences > External Tools.