-
Notifications
You must be signed in to change notification settings - Fork 0
Package Structure
OMGG/Package/PACKAGE_NAME
│── OMGG.PACKAGE_NAME.asmdef
│── Demo/
│── Editor/
│ └── Exporter.cs # CI/CD export script
│── Resources/
│── Scripts/
│── Tests/
│ ├── PlayMode/
│ └── EditMode/When creating a new package from the OMGG template, Unity automatically generates a package under the following path:
template-package/Assets/OMGG/Package/PACKAGE_NAMEThis folder represents the core of your Unity package. It includes a predefined structure that must be respected to ensure consistency across all OMGG packages.
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.
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/
- The main code of the package.
- Should follow the Development Standards for consistency and readability.
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.
- Use the
rename.ps1script after creating the package. - Update
Exporter.csonly 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.
- The structure above is mandatory and ensures consistency across all OMGG packages.
-
Exporter.csensures 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.