Skip to main content

Project Structure

GES Β· Introduction

Place plugin code, event data, generated code, and Demo assets correctly so upgrades and version control remain safe.

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

Keep the installed package under Assets/TinyGiants/GameEventSystem and put project event data under Assets/TinyGiantsData/GameEventSystem. When updating the package, retain the project databases, graphs, generated scripts, and their .meta files.


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.

Keep demo assets out of a Player build​

Use your game's scenes in Build Settings. Before removing the Demo folder from the project, check that your scenes, prefabs, databases, and scripts have no references to the demo assets. Use the cleanup tools only for generated types the project no longer uses.