Skip to content

BcoffeeDev/unity-custom-package-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 

Repository files navigation

Unity custom package template

A Unity custom package template following Unity's official package layout, designed for easy reuse, modification, and sharing.

πŸ“¦ Structure Overview

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:

πŸš€ Getting Started

  1. Go to the repository's Releases and download the latest .zip.
  2. Unzip and rename the folder from com.[company-name].[package-name] to your desired package name.
  3. Add your preferred LICENSE.md to the root folder.
  4. Fill in the package.json with your package's metadata.
  5. Open (or create) a Unity project, navigate to the Packages/ directory.
  6. Move your renamed package folder into the Packages/ folder.
  7. Open Unity. The package should now appear under Packages/ in the Project window.
  8. Add assets (scripts, prefabs, art, etc.) to the appropriate subfolders (Runtime/, Editor/, etc.) based on Unity's Package layout.
  9. For any C# code, define assembly definitions (.asmdef) based on Unity's Assembly definition and packages.
  10. (Optional) Add or remove supporting files:
    • README.md: Package introduction
    • CHANGELOG.md: Change history
    • Third Party Notices.md: Required notices for dependencies
    • Documentation~/: 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.

πŸ“€ Sharing Your Package

You can share this package in two primary ways:

1. As a Zip File

  • Use your file browser to compress the package folder into a .zip file.
  • Send it to collaborators or users.

2. Via GitHub (Recommended)

  • Create a new repository.
  • Upload all files and folders (including .meta files) 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

🀝 Contributions & Issues

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.

πŸ“„ License

This package is distributed under the terms of the license provided in LICENSE.md. Make sure to include one before sharing.

About

A Unity custom package template, designed for easy reuse, modification, and sharing.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published