Skip to main content

GES integration

Guide

Raise GES events from FlowGraphs or start Behavior entries from GES events while keeping the GCS event channel intact

Integration boundary and directions

The diagram above shows the two explicit paths between GCS and GES. Raise GES Event and Encounter Bootstrap send battle timings into GES, while On GES Event starts a selected Behavior from an external event. GCS events without these configured entries are not forwarded across systems automatically

tip

The 43 built-in GCS events always use the internal channel. Only explicitly configured FlowGraph nodes and Encounter Bootstrap events cross into GES

Detection and setup

The integration requires Game Event System in the same Unity project. The GCS editor detector looks for the TinyGiants.GES.Runtime Assembly Definition and synchronizes the TG_GES_INSTALLED Scripting Define Symbol across Standalone, Android, iOS, WebGL, and the active Build Target Group

The detector enables the integration after these steps:

  1. Import GES, or leave the existing installation unchanged
  2. Wait for Unity to compile and complete a Domain Reload
  3. The detector finds TinyGiants.GES.Runtime and adds TG_GES_INSTALLED
  4. The Raise GES Event and On GES Event nodes are fully wired, and Encounter Bootstrap shows Use GES Events
tip

After GES is removed, the detector clears the Define and GCS falls back to its internal event channel

Raise events from Encounter Bootstrap

Select the scene's GameCardEncounterBootstrap and expand Events. Use GES Events is off by default, so existing scenes use the On Bootstrap UnityEvent directly. Enabling Use GES Events replaces the UnityEvent with the On Bootstrap Events list

tip

After the encounter starts, Bootstrap raises every event in the list from top to bottom. The two modes are exclusive: GES mode does not invoke the UnityEvent, and UnityEvent mode does not raise the GES list

Raise GES events from GCS

Add Raise GES Event from the Event category in the Add Node menu wherever a FlowGraph needs to notify another project system. With GES installed, the GES Event field displays an event picker grouped by event database. Choosing an event also fills its Argument and Sender types, so no GUID or type name is entered manually

tip

The node supports parameterless events, single Argument events, and Sender Argument events. Values can come from constants, Unity Objects, structured data, or the current execution context. All settings use the visible Picker and Source fields on the node

Use the Raise GES Event node manual to configure its serialized fields, conditional options, context sources, and primitive-value boundary

Start a Behavior from a GES event

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 selected GES event active at that moment. An event activated during the battle takes effect in the next battle. After binding, any raise of the selected event triggers matching entries on:

  • cards currently in the draw, hand, discard, or exhaust pile

  • statuses sitting on living units

  • Behaviors of living enemies

All three GES event shapes are supported: parameterless, single Argument, and Sender plus Argument. The GES Payload is not passed into the FlowGraph; after the entry fires, its Behavior reads the data it needs from current battle state

Validation has your back

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 allows shared cards and test content to remain usable in projects without GES while the Console records the ignored call clearly enough to diagnose the missing integration

Keep system responsibilities separate

  1. Use the Bridge for cross-system timings such as unlocking an achievement after a Boss dies, advancing a quest after a specific card type is played, notifying the metagame system after victory, reporting an analytics milestone, or driving a scene object already listening through GES

  2. Keep damage, healing, statuses, card movement, energy, targeting, and other battle rules inside GCS so a card remains understandable from its own FlowGraph. The Bridge handles system handoff; it is not a second card-behavior layer

Troubleshooting

SymptomCheck
Raise GES Event logs that the integration is not installedConfirm GES is in the project and TinyGiants.GES.Runtime exists, then let Unity reload so TG_GES_INSTALLED updates
Warning: GameEventManager not found in sceneAdd or initialize the GES manager in the scene before the battle raises the event
Warning: the GES event GUID was not foundRepick the event on the node; the stored GUID no longer matches an existing GES event
The argument arrives as nullThe 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 onlyThe target GES event type has no matching sender-plus-argument raise, so the bridge fell back
On GES Event never firesThe 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 silentThe bridge forwards only explicit Raise GES Event calls; it does not mirror built-in GCS events into GES