A Unity custom package template following Unity's official package layout, designed for easy reuse, modification, and sharing.
com.[company-name].[package-name]/
βββ package.json
βββ README.md
βββ CHANGELOG.md
βββ LICENSE.md
βββ Third Party Notices.md
βββ Editor/
βββ Runtime/
βββ Tests/
βββ Runtime/
βββ Editor/
βββ Samples/
βββ Documentation~/
For detailed structure and conventions, refer to Unityβs documentation:
- Layout: https://docs.unity3d.com/6000.1/Documentation/Manual/cus-layout.html
.asmdef: https://docs.unity3d.com/6000.1/Documentation/Manual/cus-asmdef.html- Documentation folder: https://docs.unity3d.com/6000.1/Documentation/Manual/cus-document.html
- Changelog format: https://keepachangelog.com/en/1.0.0/
- Go to the repository's Releases and download the latest
.zip. - Unzip and rename the folder from
com.[company-name].[package-name]to your desired package name. - Add your preferred
LICENSE.mdto the root folder. - Fill in the
package.jsonwith your package's metadata. - Open (or create) a Unity project, navigate to the
Packages/directory. - Move your renamed package folder into the
Packages/folder. - Open Unity. The package should now appear under
Packages/in the Project window. - Add assets (scripts, prefabs, art, etc.) to the appropriate subfolders (
Runtime/,Editor/, etc.) based on Unity's Package layout. - For any C# code, define assembly definitions (
.asmdef) based on Unity's Assembly definition and packages. - (Optional) Add or remove supporting files:
README.md: Package introductionCHANGELOG.md: Change historyThird Party Notices.md: Required notices for dependenciesDocumentation~/: Add documentation in Markdown format
π Note: If your package does not include scripts, documentation, or samples, you can remove the following folders as needed:
Runtime/,Editor/,Tests/Runtime/,Tests/Editor/,Samples/,Documentation.
You can share this package in two primary ways:
- Use your file browser to compress the package folder into a
.zipfile. - Send it to collaborators or users.
- Create a new repository.
- Upload all files and folders (including
.metafiles) from the package directory. - Users can add your package to their Unity project in either of the following ways:
- Modify
manifest.json"dependencies": { "com.[company-name].[package-name]": "https://github.com/your-username/your-repo.git" }
- Unity Package Manager
- Open Unity.
- Go to Window β Package Manager.
- Click the + button β Add package from Git URLβ¦
- Enter:
https://github.com/your-username/your-repo.git
- Modify
If you encounter any issues or have ideas for improvements, feel free to:
- Open an issue in this repository.
- Submit a pull request with your suggested changes.
This package is distributed under the terms of the license provided in LICENSE.md. Make sure to include one before sharing.