Project Structure & Architecture
Understanding the file structure is crucial for maintaining a clean project lifecycle, ensuring safe upgrades, and managing version control effectively.
The Game Event System adheres to a strict "Logic vs. Data" Separation Principle. This architecture ensures that updating the plugin (Core Logic) never overwrites your created events, graphs, or generated code (User Data).
π The Directory Treeβ
Below is the standard hierarchy. We use distinct icons to indicate the nature of each folder:
- π‘οΈ Immutable Core: Never modify, move, or rename.
- πΎ Mutable Data: Your project data. Safe to commit, safe to modify.
- ποΈ Disposable: Safe to delete for optimization.
Assets/
βββ π TinyGiants/ # [CORE LOGIC] The immutable plugin root
β βββ π GameEventSystem/
β βββ π API/ # π‘οΈ Interfaces & Public APIs
β βββ π Demo/ # ποΈ Example Scenes & Assets (Safe to delete)
β βββ π Editor/ # π‘οΈ Custom Inspectors & Window Logic
β β βββ π Icons/ # ποΈ UI Textures (Delete for <1.2MB builds)
β βββ π Runtime/ # π‘οΈ Core Engine & Event Types
β βββ π LICENSE.txt
β βββ π Readme.txt
β
βββ π TinyGiantsData/ # [USER DATA] Your generated content sanctuary
βββ π GameEventSystem/
βββ π CodeGen/ # πΎ Auto-Generated C# Classes
β βββ π Basic/ # π‘οΈ Primitive Types (Required)
β βββ π Custom/ # πΎ Your Custom Types (Auto-regenerated)
βββ π Database/ # πΎ Your Event Database Assets (.asset)
βββ π FlowGraph/ # πΎ Your Visual Flow Graphs (.asset)
TinyGiants contains the tool itself (The Hammer). TinyGiantsData contains what you build with it (The House).
β CRITICAL: The "Plugins" Folder Warningβ
You MUST NOT move the TinyGiants or TinyGiantsData folders into the standard Assets/Plugins/ directory.
Why is this critical?β
- Compilation Order (Scripting Phase):
Unity compiles the Plugins folder before your standard game scripts (Assembly-CSharp).
- Our plugin needs to reference your custom classes (e.g., PlayerStats, InventoryItem) to generate events for them.
- If the plugin sits in Plugins, it cannot see your gameplay code, leading to "Type Not Found" errors.
- Relative Path Dependencies: The automated Code Generator and Database Manager rely on specific relative paths to locate assets. Breaking this structure may cause the "Hub" to lose track of your databases.
- Asset Protection Mechanism: The plugin includes a background AssetProtector service. If it detects these folders being moved to Plugins, it will attempt to warn you or block the operation to prevent project corruption.
πΎ Version Control (Git/SVN) Strategyβ
For teams working with Source Control, here is the recommended configuration:
| Folder Path | Strategy | Reasoning |
|---|---|---|
| TinyGiants/ | Commit | Contains the core plugin code required for the project to run. |
| TinyGiantsData/.../Database | Commit | Contains your actual Event Assets. Critical data. |
| TinyGiantsData/.../FlowGraph | Commit | Contains your visual logic graphs. Critical data. |
| TinyGiantsData/.../CodeGen | Commit | Recommended. While these can be regenerated, committing them ensures the project compiles immediately for other team members without needing to run the Wizard first. |
π§Ή Optimization Guide: Deployment Strategyβ
The Game Event System is modular. Depending on your project stage, you can strip it down to reduce build size.
Deployment Tiersβ
Use this table to decide what to keep:
| Tier | Folder to Delete | Size Savings | Consequence |
|---|---|---|---|
| Development | Keep Everything | 0 MB | Full experience with Demos and high-res UI. |
| Production | TinyGiants/GameEventSystem/Demo/ | ~10 MB | Removes examples. Safe for all projects once you know the basics. |
| Minimalist | .../Editor/Icons/ | ~4 MB | UI degrades. Custom icons disappear; Windows use default Unity styling. Logic remains 100% functional. |
π Extreme Compression (< 1.2 MB)β
If you are building for ultra-lightweight platforms (e.g., Instant Games), you can achieve the Minimalist tier.
- Delete the Demo folder.
- Delete the Icons folder.
- Ensure your CodeGen/Custom folder only contains event types you actually use. Use the Cleanup Tools to remove unused generated classes.
For most PC/Mobile projects, Level 1 (Deleting Demo) is sufficient. We recommend keeping the Icons folder to maintain a pleasant workflow for your designers.