Skip to main content

Project Structure

GES Β· Introduction

How the plugin lays out its folders, why the plugin code and your data stay separate, and which folders are safe to commit, move, or delete. Read this before reorganizing anything under Assets.

For anyone setting up version control, planning an upgrade, or trimming build size on a GES project.

Knowing the file layout keeps the project lifecycle clean, makes upgrades safe, and lets you manage version control without surprises.

The Game Event System follows a strict Logic vs. Data separation principle. Updating the plugin (core logic) never overwrites the events, graphs, or generated code you create (user data).


The Directory Tree​

Below is the standard hierarchy. Each icon marks the nature of the 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/ # [PLUGIN] Everything the plugin ships with
β”‚ └── πŸ“ GameEventSystem/ # [PLUGIN ROOT] The plugin root
β”‚ β”œβ”€β”€ πŸ“ API/ # πŸ›‘οΈ Interfaces & Public APIs
β”‚ β”œβ”€β”€ πŸ“ Data/ # [BUILT-IN DATA] Ships with the plugin
β”‚ β”‚ β”œβ”€β”€ πŸ“ CodeGen/ # πŸ›‘οΈ Built-in generated classes
β”‚ β”‚ β”‚ β”œβ”€β”€ πŸ“ Events/
β”‚ β”‚ β”‚ β”‚ └── πŸ“ Basic/ # πŸ›‘οΈ Primitive Types (Required)
β”‚ β”‚ β”‚ └── πŸ“ Components/ # Bridge Components (Raiser / Receiver)
β”‚ β”‚ β”‚ └── πŸ“ Basic/ # πŸ›‘οΈ Primitive Types (Required)
β”‚ β”‚ β”œβ”€β”€ πŸ“ Database/ # πŸ’Ύ Default Event Database Assets (.asset)
β”‚ β”‚ └── πŸ“ FlowGraph/ # πŸ’Ύ Default Visual Flow Graphs (.asset)
β”‚ β”œβ”€β”€ πŸ“ 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
β”‚ β”œβ”€β”€ πŸ“„ Changelog.txt
β”‚ β”œβ”€β”€ πŸ“„ LICENSE.txt
β”‚ └── πŸ“„ Readme.txt
└── πŸ“ TinyGiantsData/ # [USER DATA] Created on first generation
└── πŸ“ GameEventSystem/
β”œβ”€β”€ πŸ“ CodeGen/ # πŸ’Ύ Your generated event classes & bridges
β”œβ”€β”€ πŸ“ Database/ # πŸ’Ύ Your Event Database Assets (.asset)
└── πŸ“ FlowGraph/ # πŸ’Ύ Your Visual Flow Graphs (.asset)
Architecture Note

TinyGiants/GameEventSystem contains the core logic β€” the immutable plugin code plus the built-in Basic types (The Hammer). TinyGiantsData/GameEventSystem contains what you build with it β€” your custom event classes, bridge components, databases, and flow graphs (The House). It appears the first time you generate content, and you can move it anywhere under Assets/ β€” the plugin re-discovers it automatically by asset GUID.


Critical: The "Plugins" Folder Warning​

DO NOT MOVE TO "PLUGINS"

You MUST NOT move the TinyGiants folder into the standard Assets/Plugins/ directory.

Why is this critical?​

  1. Compilation Order (Scripting Phase): Unity compiles the Plugins folder before your standard game scripts (Assembly-CSharp).
    • The 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.
  2. 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.
  3. 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 PathStrategyReasoning
TinyGiants/CommitContains the core plugin code required for the project to run.
TinyGiantsData/.../DatabaseCommitContains your actual Event Assets. Critical data.
TinyGiantsData/.../FlowGraphCommitContains your visual logic graphs. Critical data.
TinyGiantsData/.../CodeGenCommitRecommended. 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:

TierFolder to DeleteSize SavingsConsequence
DevelopmentKeep Everything0 MBFull experience with Demos and high-res UI.
ProductionTinyGiants/GameEventSystem/Demo/~10 MBRemoves examples. Safe for all projects once you know the basics.
Minimalist.../Editor/Icons/~4 MBUI 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.

  1. Delete the Demo folder.
  2. Delete the Icons folder.
  3. Ensure your TinyGiantsData/GameEventSystem/CodeGen folder only contains event types you actually use. You can use the Cleanup Tools to remove unused generated classes.
tip

For most PC/Mobile projects, Level 1 (Deleting Demo) is sufficient. I recommend keeping the Icons folder to maintain a pleasant workflow for your designers.