Creating a Package
This section explains how to create a Unity package ready for upload to pckgs.io.
Unity packages require a specific folder structure and metadata in a package.json
file.
Following these steps ensures your package will be recognized by unity and pckgs.io properly.
How to Create a Package
Open Your Unity Project: Open your Unity project or create a new one.
Create Package Directory:
A Unity package is defined by its package.json file, which must reside at the root of your package’s dedicated directory.- Create a new folder (e.g.,
MyAwesomeTool
) at your Unity project’s root level as your package’s main directory. - Inside this folder, create a
package.json
file with all the necessary metadata for your package. Check out the official Unity Package Manifest documentation to see exactly what fields you need and how to structure it.
- Create a new folder (e.g.,
Naming the Package:
Each Unity package is uniquely identified by thename
key in itspackage.json
. This name must follow pckgs.io’s scoped package naming convention:- Start with the scope prefix for your organization (e.g.,
com.
,net.
,org.
,io.
) - Followed by your organization’s slug (unique identifier on pckgs.io)
- Then your package’s specific name
Examples:
com.my-company.my-package
org.my-company.awesome-tool
io.your-team.utility-kit
- Start with the scope prefix for your organization (e.g.,
Versioning:
The package version is specified by theversion
key inpackage.json
. Always use semantic versioning (e.g.,1.0.0
,1.0.1
,2.0.0
). Uploading the same version again will cause an error; new versions are added as updates.Including Package Content:
Place all assets, scripts, scenes, and other necessary files inside the package folder.
That’s it! Your package is now ready. For more detailed information, please refer to the official Unity documentation on Creating Custom Packages and Package Manifest.
See Also
- Install a Package — How to add and manage packages in your Unity projects.
- Upload a Package with GitHub Actions — Automate package uploads with GitHub Actions CI/CD workflows.