GES Integration
Bridge battles and Game Event System in both directions: raise GES events from graphs, and start graph entries when GES events fire
Integration boundary and directions
Everything else stays untouched; the 43 built-in GCS runtime events keep flowing through the internal channel whether GES is installed or not; only the explicit FlowGraph and Encounter Bootstrap paths cross the boundary
Detection and setup
The integration needs Game Event System in the same Unity project; GCS ships an editor detector that looks for the TinyGiants.GES.Runtime assembly definition and syncs the TG_GES_INSTALLED scripting define across the common build target groups (Standalone, Android, iOS, WebGL, plus the active one)
Setup is passive:
- Import GES, or keep it if it is already in the project
- Let Unity compile and reload
- The detector finds
TinyGiants.GES.Runtimeand addsTG_GES_INSTALLED - The
Raise GES EventandOn GES Eventnodes are fully wired, and Encounter Bootstrap showsUse GES Events
Removing GES reverses this: the detector drops the define and GCS falls back to its internal channel
Scene startup: Encounter Bootstrap
Select the scene's GameCardEncounterBootstrap and open Events. Use GES Events is off by default, so existing scenes keep their On Bootstrap UnityEvent behavior; enable it to replace that UnityEvent with the On Bootstrap Events list, then add parameterless GES events from the database-grouped dropdown
After the encounter starts, the bootstrap raises every configured event from top to bottom; the two modes are exclusive: GES mode never invokes the UnityEvent, and UnityEvent mode never raises the GES list; both configurations stay serialized when you switch modes
Outbound: the Raise GES Event node
Add Raise GES Event from the Event category where the graph must notify another game system; with GES installed, select the GES Event field and choose an event from the database-grouped picker; GCS fills the argument and sender types from the selected event; no GUID or type-name entry is required
Configure the node from its visible picker and source fields; it supports parameterless events, argument events, and sender-plus-argument events; argument values can come from fixed values, Unity objects, structured data, or the current effect context
Use the Raise GES Event node manual to configure its serialized fields, conditional options, context sources, and primitive-value boundary
What the bridge does at runtime
After assemblies load, the integration installs itself as the GCS event channel:
GCSEvents.Channel = new GCSEventChannelGESBridge();
When a Raise GES Event node runs, the bridge looks the event up on GameEventManager.Instance by GUID and raises it with no argument, an argument, or sender plus argument, matching what the node carries
Sender-aware raises use the event's GameEvent<TSender, TArgs> overload when it exists and fall back to an argument-only raise when it does not; A missing manager or an unknown GUID logs a warning instead of breaking the battle
Inbound: the On GES Event entry
The On GES Event entry (Entry category) starts a graph when a GES event fires during a battle; pick the event on the node the same way
When a battle starts, GCS binds to every GES event that is active at that moment; an event that only becomes active mid-battle is not picked up until the next battle starts; from then on, any raise of a picked event triggers matching entries on:
- cards currently in the draw, hand, discard, or exhaust pile
- statuses sitting on living units
- behavior graphs of living enemies
All three GES event shapes work: void, single argument, and sender plus argument; the GES payload itself is not forwarded into the graph; the entry fires, and the graph reads battle state as usual
The FlowGraph validator flags an On GES Event entry with no event picked, so an empty reference never ships silently
Behavior without GES
GCS still compiles and runs, and every built-in event keeps working; A graph that reaches a Raise GES Event node does not crash; the internal channel logs a warning instead:
[GCSEventChannelInternal] RaiseGesEvent('...') ignored: GES integration not installed.
This is deliberate; shared cards and test content can live in projects without GES, and the Console still tells you the integration is missing rather than swallowing the call
System responsibilities
Use the bridge for moments the rest of the game cares about: unlocking an achievement when a boss dies, advancing a quest when a card type is played, notifying a metagame controller after victory, reporting milestones to analytics, or poking scene systems that already listen through GES
Keep ordinary combat logic inside GCS: damage, healing, statuses, card movement, energy, targeting, and battle-only reactions; A card should stay readable from its own FlowGraph; the bridge is an integration boundary, not a second place to author card behavior
Troubleshooting
| Symptom | Check |
|---|---|
Raise GES Event logs that the integration is not installed | Confirm GES is in the project and TinyGiants.GES.Runtime exists, then let Unity reload so TG_GES_INSTALLED updates |
Warning: GameEventManager not found in scene | Add or initialize the GES manager in the scene before the battle raises the event |
| Warning: the GES event GUID was not found | Repick the event on the node; the stored GUID no longer matches an existing GES event |
| The argument arrives as null | The argument type must resolve and the selected source must produce a value of that type; repicking the event refills the type |
| A sender-aware event raises with the argument only | The target GES event type has no matching sender-plus-argument raise, so the bridge fell back |
On GES Event never fires | The event must be picked on the node and active when the battle starts, and its owner (card, status, or enemy) must be in a pile or alive when the raise happens |
| GCS events fire but GES listeners stay silent | The bridge forwards only explicit Raise GES Event calls; it does not mirror built-in GCS events into GES |