Game Event Creator
Create typed Game Events in batch: parameterless events, single-parameter events, and sender events. This page walks through the creation workflow and explains how the codegen and compilation pipeline turns queued types into event assets.
For developers setting up the event catalog for a project or a new feature.The Creator is where you generate events in bulk. It handles batch event queuing, automatic code compilation, and ScriptableObject creation in one workflow.
Opening the Creatorβ
The Creator only opens from the Game Event Editor:
Game Event Editor β Click "+ New Event" button (top-right)
The Creator needs to know which database to add events to. Opening from the Editor ensures proper context.
Interface Zonesβ
The window is organized into four functional areas:
| Zone | Location | Purpose |
|---|---|---|
| A. Event Mode Tabs | Top | Switch between Void, Single Parameter, or Sender events |
| B. Configuration Area | Middle | Select types and configure event details |
| C. Events Queue | Bottom | Review pending events before creation |
| D. Status Badge | Top-right | Shows total queued count (e.g., "7 Queued Total") |
Three Event Modesβ
Choose the architecture that fits your need:
- 1. Parameterless
- 2. Single Parameter
- 3. With Sender
Parameterless Eventsβ
Type: GameEvent (Void)
The simplest signalβno data, just notification.

Best For:
π±οΈ UI Triggers β OnPauseButtonClick, OnMenuOpen
π Global States β OnGameStart, OnLevelComplete
π Simple Actions β OnJump, OnFire, OnInteract
How to Use:
- Click "Add Event" button
- Event appears in queue with default name "NewEvent"
- Rename it in the queue (e.g., "OnGameStart")
- Set category if desired (e.g., "Core")
- Click "Create X Event(s)" at bottom
No Type Selection Needed: Since it's parameterless, you just click and add.
Single Parameter Eventsβ
Type: GameEvent<T>
Carries one piece of data with the notification.

Best For:
π Value Changes β OnHealthChanged(float), OnScoreUpdated(int)
π State Updates β OnGameStateChanged(GameState)
π¦ Object Events β OnEnemySpawned(GameObject)
πΎ Data Sync β OnPlayerDataChanged(PlayerData)
Two Ways to Add:
Method 1: Quick Add - Basic Typesβ
For built-in Unity types (int, float, Vector3, GameObject, etc.):
- Select Type from dropdown (shows all 32 basic types)
- Click "Add" button
- Event added to queue automatically
Available Basic Types:
- C# Primitives:
int,float,bool,string, etc. - Math Types:
Vector2,Vector3,Quaternion,Color, etc. - Components:
GameObject,Transform,Rigidbody, etc. - Assets:
Sprite,Material,AudioClip, etc.
Method 2: Search - Custom Typesβ
For your own C# classes:
- Type in search bar (e.g., "PlayerData")
- System searches all serializable types in your project
- Click "Add" next to your type
- Event added to queue
Search Features:
- β Fuzzy matching (type "plr" finds "PlayerData")
- β Shows namespace for disambiguation
- β Badge shows how many events of this type are queued
- β Green flash effect when adding
Requirements for Custom Types:
// β
This works
[System.Serializable]
public class PlayerData {
public string playerName;
public int level;
}
// β This won't appear in search
public class NonSerializableClass { } // Missing [Serializable]
Sender Eventsβ
Type: GameEvent<TSender, TArgs>
Carries both who fired it (sender) and what happened (argument).

Best For:
βοΈ Combat β OnDamageTaken(GameObject victim, DamageInfo damage)
π€ Interactions β OnItemPickedUp(Player player, ItemID item)
π Networking β OnPlayerJoined(NetworkPlayer sender, string playerName)
π Complex Events β OnQuestCompleted(QuestGiver npc, QuestData quest)
Recommended Pattern:
- TSender = The actor/source (
GameObject,Player,Enemy) - TArgs = The data/payload (
int,DamageInfo,Vector3)
How to Use:
-
Select Sender Type:
- Choose from Basic Types dropdown, OR
- Search for custom type
- Click "Select" when ready
-
Select Argument Type:
- Choose from Basic Types dropdown, OR
- Search for custom type
- Click "Select" when ready
-
Add Event:
- Blue button appears: "Add Event: GameObject β int" (example)
- Click it to add to queue
Selected Type Display:
When you select types, they appear in green boxes:
β
Selected Sender: GameObject <small>(UnityEngine)</small>
β
Selected Argument: DamageInfo <small>(YourGame.Combat)</small>
Click the Γ to clear and choose different types.
Batch Creation Workflowβ
The Creator's power is batch processingβcreate many events at once instead of one-by-one.
Step-by-Step Processβ
1. Queue Eventsβ
Add multiple events across different modes:
π Switch to Parameterless β Add OnGameStart
π Switch to Parameterless β Add OnGamePause
π’ Switch to Single Parameter(int) β Add OnScoreChanged
π Switch to Single Parameter(float) β Add OnHealthChanged
π₯ Switch to Sender <GameObject,int> β Add OnEnemyDamaged
Total in Queue: 5 events pending creation
Visual Feedback:
- Top-right badge updates: "5 Queued Total"
- Each mode shows its own count: "Events Queue (2)"
2. Review & Configureβ
In the Events Queue section:
Per Event:
- βοΈ Checkbox: Toggle selection (only selected events will be created)
- Name Field: Rename event (default: "NewEvent", "OnInt", etc.)
- Category Field: Set category for filtering later
- Type Label: Shows event type signature
- Γ Button: Remove from queue
Bulk Actions:
- Select All: Check all events in current queue
- Clear Selection: Uncheck all events
- Remove All: Clear entire queue (with confirmation)
3. Execute Creationβ
Click the big green button at bottom:
+ Create 5 Event(s)
What Happens Next: See the next section β¬οΈ
Understanding the Creation Processβ
When you click "Create", a sophisticated automation pipeline runs. Here's what happens behind the scenes:
Scenario 1: Code Already Existsβ
Example: Creating an int event.
Speed: Instant (< 1 second)
No Compilation: You see the event in the Editor immediately.
Scenario 2: Code Needs Generationβ
Example: Creating a PlayerData event (your custom class).
Speed: 3-10 seconds (depends on project size)
You'll See:
- Creator window closes
- Unity compilation spinner appears
- Console logs appear
- Event appears in Editor automatically
For each custom type, the system creates one C# file containing:
// File: PlayerDataGameEvent.cs
// 1. The Event Class
public class PlayerDataGameEvent : GameEvent<PlayerData> { }
// 2. The Binding Field (for Inspector)
public partial class GameEventManager {
public partial class EventBinding {
public UnityEvent<PlayerData> PlayerDataGameEventAction;
}
}
Why Both? The event class is for raising events. The binding field is for Inspector callbacks.
Mixed Batch Handlingβ
What if you queue both existing and new types?
Your Queue:
1. OnGameStart (void) β
Code exists
2. OnScoreChanged (int) β
Code exists
3. OnPlayerDataChanged (PlayerData) β οΈ Needs generation
4. OnQuestCompleted (QuestData) β οΈ Needs generation
System Behavior:
Console Output:
β
[Batch] Immediate events created successfully. (2 events)
β³ Generated 2 script files. Triggering compilation to finish creation...
(After compilation)
π― Batch Creation Complete: 2 events created.
Sender Events Special Caseβ
Sender events (GameEvent<TSender, TArgs>) follow the same logic but generate more complex code:
// File: GameObjectDamageInfoGameEvent.cs
// Event class with TWO type parameters
public class GameObjectDamageInfoGameEvent
: GameEvent<GameObject, DamageInfo> { }
// Binding field with TWO parameters
public UnityEvent<GameObject, DamageInfo>
GameObjectDamageInfoGameEventAction;
Best Practicesβ
DOβ
Pre-Generate Common Types: If you know you'll use certain types frequently, you can refer to Code Gen & Cleanup to pre-generate custom type classes and event binding code.
Use Meaningful Names
β
Good Names:
- OnPlayerHealthChanged
- OnEnemySpawned
- OnQuestCompleted
- OnScoreUpdated
β Avoid:
- NewEvent1
- Test
- Event_Copy
- TempEvent
Organize with Categories
Use categories to group related events:
π₯ Category: "Combat"
- β‘ OnDamageTaken
- β‘ OnEnemyKilled
- β‘ OnWeaponFired
π© Category: "UI"
- β‘ OnButtonClicked
- β‘ OnMenuOpened
- β‘ OnDialogClosed
πͺ Category: "Player"
- β‘ OnPlayerJumped
- β‘ OnPlayerDied
- β‘ OnLevelUp
AVOIDβ
Don't Close During Compilation
β WRONG:
1. Click Create
2. See "Triggering compilation..." message
3. Immediately close Unity or force-stop compilation
β
RIGHT:
1. Click Create
2. Wait for compilation bar to finish
3. Events appear automatically
Why? Interrupting compilation may leave generated code files without corresponding assets.
Don't Manually Edit Generated Files
β WRONG:
Open: TinyGiants/GameEventSystem/Data/CodeGen/Events/PlayerDataGameEvent.cs
Edit: Add custom methods, change namespace, etc.
β
RIGHT:
Let the system manage generated files.
Extend functionality through separate scripts.
Why? The system may regenerate these files, overwriting your changes.
Progress Indicatorsβ
During Creationβ
Immediate Creation (code exists):
β
Events created successfully.
Code Generation (new types):
β³ Generated 3 script files. Triggering compilation to finish creation...
After Compilation:
π― Batch Creation Complete: 1 events created.
Console Logs Explainedβ
Detailed Generation Report:
ββββββββββββββββββββββββββββββββββ
π§© Event Code Generation Complete
ββββββββββββββββββββββββββββββββββ
β
Generated 3 event files (Type + Binding).
ββββββββββββββββββββββββββββββββββ
What This Means:
- 3 new C# files created
- Each file contains event class + binding field
- Files are in
TinyGiants/GameEventSystem/Data/CodeGen/Events/andData/CodeGen/Components/ - Assets will be created automatically after compilation
Troubleshootingβ
Events Not Appearing After Compilationβ
Problem: Clicked Create, compilation finished, but events missing.
Solutions:
Check Console for Errors:
Look for red errors during compilation
Common issue: Type not serializable
Fix: Add [System.Serializable] to your class
Verify Database Selection:
1. Open Game Event Editor
2. Check which database is selected
3. Events are added to THAT database
Manual Asset Check:
1. Navigate to: TinyGiants/GameEventSystem/Data/Database/
2. Find your database asset
3. Expand it in Project window
4. Look for your event sub-assets
Compilation Takes Too Longβ
Problem: Stuck on "Compiling Scripts..." for minutes.
Causes:
- Large project with many scripts
- Other compilation errors blocking progress
- Unity Editor performance issues
Solutions:
1. Check Console for compilation errors
2. Fix any red errors first
3. Try: Assets β Reimport All (last resort)
4. Restart Unity if stuck > 5 minutes
"Type Not Found" After Generationβ
Problem: Console says type not found even after compilation.
Checklist:
β Is your type [Serializable]?
β Is your type public?
β Does Unity recognize your type? (check Inspector)
β Did compilation actually finish? (no spinner)
Fix:
// Make sure your class looks like this:
using System;
using UnityEngine;
[Serializable] // β Required
public class PlayerData // β Must be public
{
public string playerName;
public int level;
}
Duplicate Event Namesβ
Problem: Two events with same name in queue.
Behavior: System auto-renames with suffix:
Queue:
- OnPlayerDeath
- OnPlayerDeath_1
- OnPlayerDeath_2
Better Practice: Rename manually in the queue before creating it.
First-Time Setup: Create all your common event types in one batch session. Wait for compilation once. From then on, event creation is instant since all code exists. This one-time investment saves hours over the project lifetime.
Generated files live in:
Assets/TinyGiants/GameEventSystem/Data/CodeGen/
ββ Events/ (event classes)
β ββ Basic/ (pre-generated for int, float, etc.)
ββ Components/ (bridge components: Raiser / Receiver)
ββ Basic/ (pre-generated for int, float, etc.)
These folders are safe to commit to version controlβthey're deterministic and won't cause merge conflicts.