Skip to content

Package Structure

Ethan edited this page Sep 27, 2025 · 4 revisions
OMGG/Package/PACKAGE_NAME
│── OMGG.PACKAGE_NAME.asmdef
│── Demo/
│── Editor/
│   └── Exporter.cs # CI/CD export script
│── Resources/
│── Scripts/
│── Tests/
│   ├── PlayMode/
│   └── EditMode/

Package Structure

When creating a new package from the OMGG template, Unity automatically generates a package under the following path:

template-package/Assets/OMGG/Package/PACKAGE_NAME

This folder represents the core of your Unity package. It includes a predefined structure that must be respected to ensure consistency across all OMGG packages.


🔄 Package Renaming

The default folder is created as PACKAGE_NAME. To properly rename your package (including assemblies, workflows, references...) use the provided script:

rename.ps1

📌 More details about the renaming process can be found in Creating a New Package.


📦 Package Content

Inside OMGG/Package/PACKAGE_NAME, you will find the following structure:

OMGG/Package/PACKAGE_NAME
│── OMGG.PACKAGE_NAME.asmdef
│── Demo/
│── Editor/
│   └── Exporter.cs # CI/CD export script
│── Resources/
│── Scripts/
│── Tests/
│   ├── PlayMode/
│   └── EditMode/

1️⃣ Assembly Definition

  • File: OMGG.PACKAGE_NAME.asmdef
  • Defines the assembly for the package and its dependencies.
  • Developers are responsible for adding any required dependencies here.

📌 Tip: Keep dependencies minimal to avoid unnecessary coupling between packages.


2️⃣ Demo/

  • Contains demo scenes, prefabs, or example scripts.
  • Mandatory: Every package must include a working demo to illustrate how it should be used.
  • This demo is used for validation and documentation during deployment.

3️⃣ Scripts/


4️⃣ Editor/

  • Contains editor-specific utilities and tools.
  • Anything placed here will not be included in runtime builds.

5️⃣ Resources/

  • Stores additional assets such as scenes, prefabs, or data files required by the package.
  • These resources can be dynamically loaded at runtime via Resources.Load.

6️⃣ Tests/ Split into two subfolders:

  • PlayMode/ → Tests executed within a running Unity environment.
  • EditMode/ → Tests executed in the Unity Editor without entering Play Mode.

📌 Tip: Keep tests small, isolated, and well-documented to ensure maintainability.


✅ Developer Responsibilities

  • Use the rename.ps1 script after creating the package.
  • Update Exporter.cs only if you add folders that must be exported.
  • Add dependencies to the assembly definition only when required.
  • Always provide a Demo folder with enough content to understand package usage.
  • Follow the OMGG Development Standards for coding, testing, and documentation.

📌 Notes

  • The structure above is mandatory and ensures consistency across all OMGG packages.
  • Exporter.cs ensures CI/CD exports correctly (Tests ignored by default).
  • Failure to provide a proper demo or follow the conventions may delay validation and integration of your package.

Clone this wiki locally