GAME EVENTS TOOLKITDOCUMENTATION
← Asset
ESEN
Unity 2022.3+
OFFICIAL GUIDE

Decoupled events for any Unity project.

A professional ScriptableObject-based event system. 8 event types, Inspector-configurable listeners, editor tools and zero external dependencies.

Engine
Unity 2022.3 LTS+
Render
Built-in / URP / HDRP
Dependencies
None
01 Events as assets: create, connect and monitor without coupling components.
01

GETTING STARTED

Installation & demo scene

1

Import the package

Import Game Events Toolkit from the Asset Store. Wait for Unity to finish compiling.

2

Run the Setup

Go to Tools → Game Events Toolkit → Setup Demo Scene and click "Create Demo".

3

Press Play

Move with WASD, walk near items to collect them, use UI buttons to test events.

WASDMove the player
↑↓←→Move (alternative)
UI ButtonsDamage / Heal / Pick Up
02 The demo scene includes a movable player, collectible items with animation, a gradient health bar, death/restart system and Event Debugger.
02

CONCEPT

System architecture

The pattern is simple: a ScriptableObject acts as an event channel. Any script can raise to that channel, and any listener can subscribe, without knowing each other.

A

Raiser

Any MonoBehaviour with a reference to the event. Calls Raise() or Raise(value).

B

Event (SO)

A ScriptableObject that stores the listener list and notifies them when raised.

C

Listener

A component that registers on OnEnable and fires a UnityEvent as a response.

03

EVENTS

Creating events

Events are ScriptableObject assets. Create them from the project menu and reuse across any scene.

PathAssets → Create → Game Events Toolkit → Events → [Type]

VoidGameEvent

Use
Signals without data: death, game start, pause.

FloatGameEvent

Use
Numeric values: health, damage, speed.

StringGameEvent

Use
Text: item name, dialogue, notifications.

All available types

V

Void

Signal without data.

B

Bool

true / false

I

Int

Integer number

F

Float

Decimal number

S

String

Text string

V2

Vector2

2D position / direction

V3

Vector3

3D position / direction

GO

GameObject

Object reference

04

RAISING

Raising events from code

Add a [SerializeField] reference to the event in your script, assign it in the Inspector and call Raise().

Void event

using UnityEngine;
using GameEventsToolkit;

public class PlayerDeath : MonoBehaviour
{
    [SerializeField] private VoidGameEvent playerDiedEvent;

    public void Die()
    {
        playerDiedEvent.Raise();
    }
}

Typed event

using UnityEngine;
using GameEventsToolkit;

public class HealthSystem : MonoBehaviour
{
    [SerializeField] private FloatGameEvent healthChangedEvent;
    private float health = 100f;

    public void TakeDamage(float amount)
    {
        health = Mathf.Max(0f, health - amount);
        healthChangedEvent.Raise(health);
    }
}
05

RESPONSES

Listeners

Listeners are components that subscribe to an event and fire UnityEvent responses. No code required.

1

Add the component

Add Component → Game Events Toolkit → [Type] Game Event Listener

2

Assign the event

Drag the ScriptableObject into the Game Event field.

3

Wire responses

Add entries to Response (UnityEvent) just like a button.

03 A FloatGameEventListener wired to HealthChanged that calls UpdateHealth on DemoHealthUI.

Available listeners

VoidGameEventListener

Game Events Toolkit → Void Game Event Listener

Game Event
VoidGameEvent to listen to
Response
UnityEvent (no parameters)

FloatGameEventListener

Game Events Toolkit → Float Game Event Listener

Game Event
FloatGameEvent to listen to
Response
UnityEvent<float>

StringGameEventListener

Game Events Toolkit → String Game Event Listener

Game Event
StringGameEvent to listen to
Response
UnityEvent<string>

BoolGameEventListener

Game Events Toolkit → Bool Game Event Listener

Game Event
BoolGameEvent to listen to
Response
UnityEvent<bool>
06

REFERENCE

Event types

Quick reference of all included types.

TypeEvent classListener
VoidVoidGameEventVoidGameEventListener
BoolBoolGameEventBoolGameEventListener
IntIntGameEventIntGameEventListener
FloatFloatGameEventFloatGameEventListener
StringStringGameEventStringGameEventListener
Vector2Vector2GameEventVector2GameEventListener
Vector3Vector3GameEventVector3GameEventListener
GameObjectGameObjectGameEventGameObjectGameEventListener
07

TOOLS

Custom Inspector

Every ScriptableObject event shows extended information in the Inspector during Play Mode.

Static information

  • Event description
  • Event type

Runtime (Play Mode only)

  • Active listener count
  • Times raised
  • Last value sent
  • Last raised time
  • Test button with value field
08

MONITORING

Event Debugger

An editor window that shows all active events in the scene with real-time information.

OpenTools → Game Events Toolkit → Event Debugger
04 The Event Debugger shows name, type, raise count, active listeners, last value and time for each event.

Columns

EventScriptableObject asset name
TypeEvent type (Void, Float, String…)
RaisedNumber of times raised
ListenersCurrently registered listeners
Last ValueLast sent value (typed events)
Last RaisedTime of last raise
09

DEVELOPMENT

API reference

GameEventBase (abstract)

string DescriptionEvent description (read-only). string TypeNameType name ("Void", "Float"…). int ListenerCountNumber of registered listeners.

VoidGameEvent

void Raise()Raises the event to all registered listeners. void RegisterListener(IGameEventListener)Registers a void listener. void UnregisterListener(IGameEventListener)Unregisters a void listener.

GameEvent<T> (Float, Int, Bool, String…)

void Raise(T value)Raises the event with a typed value. void RegisterListener(IGameEventListener<T>)Registers a typed listener. void UnregisterListener(IGameEventListener<T>)Unregisters a typed listener.

Interfaces

IGameEventListenerInterface for void listeners. Method: OnEventRaised() IGameEventListener<T>Interface for typed listeners. Method: OnEventRaised(T value)
10

EXTENSION

Extending the system

Creating a custom event type requires just 2 one-liner classes.

Step 1: Create the event

using UnityEngine;
using GameEventsToolkit;

[CreateAssetMenu(menuName = "Game Events Toolkit/Events/Color Event")]
public class ColorGameEvent : GameEvent<Color>
{
    public override string TypeName => "Color";
}

Step 2: Create the listener

using GameEventsToolkit;
using UnityEngine;

public class ColorGameEventListener
    : BaseGameEventListener<ColorGameEvent, Color> { }
11

GUIDE

Best practices

Recommended

  • One event per concept ("HealthChanged", not "DataChanged").
  • Organize events in folders by system.
  • Use the ScriptableObject description to document.
  • Disable listeners you don't need (disable the GameObject).
  • Use the Event Debugger during development.

Avoid

  • Raising every frame (use only for state changes).
  • Creating generic events that serve everything.
  • Manual register/unregister instead of using listeners.
  • Direct references between systems (the event is the bridge).
12

PROJECT

Project structure

The asset is organized with Assembly Definitions to separate runtime and editor code.

Runtime/Core/GameEventBase, GameEvent<T>, interfaces
Runtime/Events/8 concrete event types
Runtime/Listeners/Base listener + 8 concrete listeners
Runtime/Utilities/GameEventRaiser (helper component)
Editor/Inspectors/Custom Inspector for all events
Editor/EventDebugger/Event Debugger window
Demo/Scripts/Demo scene scripts
Demo/Scenes/GameEventsDemo.unity

GameEventsToolkit.Runtime

Runtime Assembly Definition. Auto-referenced, no external dependencies.

GameEventsToolkit.Editor

Editor Assembly Definition. References the runtime, Editor platform only.

13

SUPPORT

Troubleshooting

Listener doesn't respond to the event

Verify the listener's Game Event field has the same ScriptableObject the raiser uses. Check the listener's GameObject is active and the listener component is enabled.

Custom Inspector doesn't show runtime info

Runtime information only appears during Play Mode. Select the event asset in the Project and enter Play Mode.

Event Debugger is empty

The debugger shows events that exist as assets in the project. Make sure the ScriptableObjects are created and not hidden by HideFlags.

Compilation error: namespace not found

Add using GameEventsToolkit; at the top of your script. If you use your own Assembly Definitions, add a reference to GameEventsToolkit.Runtime.

Events don't reset when exiting Play Mode

Debug fields use [NonSerialized] and reset automatically with domain reload. If you have "Enter Play Mode Settings" without domain reload, counters may persist — press Reset in the debugger.

Can I create custom event types?

Yes. Inherit from GameEvent<T> for the event and from BaseGameEventListener<TEvent, TValue> for the listener. See the Extending the system section.