Skip to content

Creating a New Package

Ethan edited this page Sep 27, 2025 · 6 revisions

Creating a New Package

This guide explains how to create a new Unity package repository using the OMGG template.


1️⃣ Create a Repository from the Template

  1. Navigate to the template repository: 👉 omgg-dev/template-package
  2. On the top right, click “Use this template”. 📸 Screenshot placeholder: Use this template screenshot
  3. You will be redirected to “Create a new repository”. Fill in the required fields:
  • Include all branches → Leave on off (normally not needed).
  • Owner → Select omgg-dev.
  • Repository name → Provide a descriptive name for the new package.
  • Description → Short description of the package purpose (Not necessary as long as you update the README.md later).
  • Visibility → Choose Public for now.
  1. Click “Create repository”. 📸 Screenshot placeholder: Create repository screenshot

2️⃣ Clone the Repository

Clone your newly created repository locally:

git clone https://github.com/omgg-dev/REPO_NAME.git
cd REPO_NAME

3️⃣ Run the Rename Script

After cloning, run the provided script rename.ps1 to replace all template references with your package name.

Example:

./rename.ps1 deck-buildings

This will automatically:

  • Rename template-packagedeck-buildings in workflows.
  • Update the Unity project name.
  • Rename the package folder inside OMGG/Package/PACKAGE_NAME.
  • Update assembly definitions (OMGG.PACKAGE_NAME.asmdef) and all references.
  • Update the README.md badges. If the name of the GitHub repository is different from the one entered with the script, manually edit the badges in README.md:
    • Workflows Status Badge
    • Commits badge
  • Update Exporter.cs to point to the new package name so CI/CD package export works correctly.

📌 Important: Always run this step immediately after creating a new repository to avoid conflicts later.


4️⃣ Configure GitHub Actions Secrets

Before opening Unity, you need to configure the repository secrets for CI/CD.

  1. Go to your repository on GitHub.
  2. Navigate to: Settings → Secrets and variables → Actions
  3. Add the following secrets: | Secret | Description | | ---------------- | --------------- | | UNITY_LICENSE | Unity license file (ULF) contents. | | UNITY_EMAIL | Unity account email. | | UNITY_PASSWORD | Unity account password. |

📌 Full explanation available in the CI/CD Workflows page.

⚠ If you don’t know which values to use, contact: @PharaEthan | Lead Developer | ethan.hernou@gmail.com


5️⃣ Open the Project in Unity

  1. Launch Unity Hub.
  2. Add the cloned repository folder as a project.
  3. Open it with the Unity version specified in the workflow (package-builder.yaml).

6️⃣ Development Workflow

Once the package is set up, you can start development. Remember to:

  • Write your scripts inside the Scripts/ folder.
  • Add dependencies in the OMGG.PACKAGE_NAME.asmdef file if necessary.
  • Create Editor scripts in the Editor/ folder.
  • Store assets in the Resources/ folder.
  • Add tests in Tests/EditMode or Tests/PlayMode.
  • Provide a Demo folder with a working scene to illustrate package usage.

📌 The Demo is mandatory for deployment and documentation purposes.


7️⃣ Exporting Packages

  • The CI/CD workflow uses Exporter.ExportPackage (defined in Editor/Exporter.cs) to export your package.
  • By default Exporter.cs ignores Tests/ folders.
  • If you add custom folders to be exported, update Exporter.cs accordingly.
  • rename.ps1 updates Exporter.cs automatically with the new package name.

8️⃣ Update Documentation

Every new package repository must include:

An updated README.md explaining the purpose of the package.

  • A dedicated Wiki (if needed) following the OMGG documentation standards.
  • License files:
    • LICENSE.md → General project license.
    • ASSET_LICENSE.md → Asset-specific license and usage terms.

9️⃣ Enable the Wiki (Optional but Recommended)

By default, repositories created from a template do not have a Wiki enabled. If your package requires documentation, you must activate it manually:

  1. Go to your repository on GitHub.
  2. Navigate to: Settings → Features → Wiki
  3. Check the Wiki option to enable it.

📌 Once enabled, you can start documenting your package directly in the repository Wiki.


✅ Summary

  • Create the repo from template-package.
  • Clone it locally.
  • Run rename.ps1 to configure everything.
  • Configure GitHub Actions secrets.
  • Open in Unity and start development.
  • Add tests + demo.
  • Update documentation and licenses.

Read the summary to make sure you haven't forgotten anything.


📞 Need Help?

If you encounter any issues during the package creation process, contact:

Clone this wiki locally