跳到主要内容

Game Event System for Unity

Game Event System (GES) lets components send and receive typed events through shared Unity assets. Create events in a database, bind responses in the Inspector or C#, then follow the event in Play Mode.

Game Event System workspace

Open Tools > TinyGiants > GES > Game Event System to initialize the active scene. Once the dashboard reports System Initialized, open Game Event Editor to select a database and create your first event.

Create and use an event​

Game Event System architecture

The diagram shows senders and listeners pointing to the same event asset. A sender raises that asset, and GES calls the listeners registered to it. Use a parameterless event for a signal such as level start, a single-argument event for data such as damage, or a Sender + Args event when the response also needs to know who raised it.

Events are typed sub-assets in a GameEventDatabase. Use categories to filter related events in the editor and separate databases for distinct gameplay modules.

Open the installation guide

Configure a response​

In Game Event Behavior, add a target and method in the native UnityEvent list under Event Action. Use Action Condition to check whether the action can run, and Schedule Configuration to set a delay or repeat interval.

Game Event Behavior window

GES 2.3.0 also supports a separate Action Condition in the Receiver Inspector. Use it when two receivers of the same event need different rules. To register a response for an object spawned during play, use the typed C# listener API and remove the callback when the object is disabled.

Configure events and callbacks

Connect and trace multiple events​

Use Trigger in FlowGraph for independent responses and Chain for steps that need to run in order. A level-end event can start audio and particle effects through Trigger, then use Chain to run a fade followed by a scene transition.

Trigger and Chain connections in FlowGraph

Use Event Finder to locate references to the event asset before editing it. In Play Mode, use Game Event Monitor to inspect which events fired, which listeners ran, and which conditions blocked an action.

Open the FlowGraph editor guide · Open the monitor guide

Build and try the demos​

GES supports Unity 2021.3 LTS and newer on Mono and IL2CPP. The AOT Condition Baker generates evaluators for serialized conditions on IL2CPP targets. Run the baker again after editing a serialized condition that your build uses.

Start with 00_QuickStart to create, raise, and verify an event. The 14 other demo groups cover typed parameters, listener order, conditions, scheduling, scene persistence, flows, multiple databases, the runtime API, and monitoring.

Try 00_QuickStart · Prepare an AOT build · Open the Unity discussion · Contact support