Skip to main content

Managing Event Databases

The Game Event Manager is the runtime brain of the entire system. It is responsible for loading your data (Events & Flows) into memory, managing their lifecycle, and providing real-time telemetry.

Unlike the Dashboard (which is a tool for creating), the Manager is the container that holds your data.

Full Inspector View

πŸ—οΈ The Data Architecture​

Before diving into the UI, it is critical to understand how this system stores data.

  1. Container-Based Storage: Events are not loose files. They are stored as Sub-Assets inside a parent Database Asset (.asset).
  2. Separation of Concerns:
    • Databases: Store Event Definitions (Identity, Name, Type).
    • Flow Graphs: Store Logic Nodes (Triggers, Chains, Delays).
  3. The "Sanctuary": By default, all assets are created in Assets/TinyGiantsData/GameEventSystem/.
CRITICAL: Do Not Manually Delete Sub-Assets

Because events are sub-assets, NEVER delete them directly from the Project view by expanding the Database asset.


πŸ—ƒοΈ Database Management​

This section controls which sets of events are active in your scene. The system supports Multi-Database Architecture, allowing you to split events (e.g., "Core", "Combat", "UI") and load them as needed.

Database Panel

Management Actions​

ActionDescription
Active / InactiveToggles whether this database is loaded. Inactive databases will not resolve event lookups at runtime.
Remove (X)Removes the database from this list only. It DOES NOT delete the asset file from your project.
+ Create NewCreates a new .asset database file in the TinyGiantsData folder and adds it here.
πŸ“‚ Add ExistingOpens a file picker to add a database you created previously (or via the Project Context Menu).
Project Context Menu

You can also create databases directly in the Project window: Right-Click > Create > TinyGiants > Game Event System > Game Event Database


πŸ•ΈοΈ Flow Graph Management​

Similar to databases, this section manages your Visual Logic Containers.

Flow Graphs Panel

  • Flow Container: A ScriptableObject that holds multiple "Flow Graphs".
  • Workflow: You can have a "Global Flow" for persistent logic and "Level Specific Flows" that you load/unload per scene.

πŸ“Š Live Statistics (Telemetry)​

The Inspector provides three dedicated panels to monitor the health and composition of your event system.

1. Overview Stats​

Tracks the binding status of your events.

Overview Stats

  • Total Events: The sum of all events across all active databases.
  • Bound Events: The number of events that are currently configured in the Inspector (Visual Binding).
  • Runtime Binding: Events bound via code (AddListener) are tracked separately in the Runtime Monitor.

2. Composition​

Shows the complexity distribution of your event architecture.

Composition Stats

  • Void Events: Simple signals (e.g., OnJump).
  • Single Parameter: Typed payloads (e.g., OnHealthChanged(float)).
  • With Sender: Source-aware events (e.g., OnDamage(GameObject sender, float amount)).

3. Event Types Registry​

A live registry of every data type currently compiled and supported by your project.

Built-in Types (Out of the Box)​

The system comes pre-loaded with native support for 32 standard types, categorized exactly as defined in the core engine:

πŸ“‹ View Supported Built-in Types
C# TypesMathComponentsAssets
intVector2GameObjectSprite
floatVector3TransformTexture2D
doubleVector4RectTransformMaterial
boolVector2IntRigidbodyAudioClip
stringVector3IntRigidbody2DAnimationClip
byteQuaternionCollider
longRectCollider2D
charBoundsCamera
ColorLight
ParticleSystem

Custom & Sender Types​

When you create an event with a Custom Class (e.g., PlayerStats) or a Sender Event (e.g., <GameObject, DamageInfo>), those types will automatically appear in this list after code generation.


πŸ›  Best Practices​

βœ… DO​

  • Split your databases: Keep a Global_DB for game-wide events and Level_DB for specific maps.
  • Keep the Manager: Ensure the GameEventManager object exists in every scene (or use DontDestroyOnLoad via the Persistent Manager).
  • Use "Add Existing": When working in a team, referencing existing database assets ensures everyone uses the same GUIDs.

❌ DO NOT​

  • Delete Assets Manually: I repeat, never delete sub-assets from the Project View. Always use the Editor Windows.
  • Move to Plugins: Keep your Data folder (TinyGiantsData) outside of the Plugins folder.