Import the package
Import Game Events Toolkit from the Asset Store. Wait for Unity to finish compiling.
A professional ScriptableObject-based event system. 8 event types, Inspector-configurable listeners, editor tools and zero external dependencies.
GETTING STARTED
Import Game Events Toolkit from the Asset Store. Wait for Unity to finish compiling.
Go to Tools → Game Events Toolkit → Setup Demo Scene and click "Create Demo".
Move with WASD, walk near items to collect them, use UI buttons to test events.
CONCEPT
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.
Any MonoBehaviour with a reference to the event. Calls Raise() or Raise(value).
A ScriptableObject that stores the listener list and notifies them when raised.
A component that registers on OnEnable and fires a UnityEvent as a response.
EVENTS
Events are ScriptableObject assets. Create them from the project menu and reuse across any scene.
Signal without data.
true / false
Integer number
Decimal number
Text string
2D position / direction
3D position / direction
Object reference
RAISING
Add a [SerializeField] reference to the event in your script, assign it in the Inspector and call Raise().
using UnityEngine;
using GameEventsToolkit;
public class PlayerDeath : MonoBehaviour
{
[SerializeField] private VoidGameEvent playerDiedEvent;
public void Die()
{
playerDiedEvent.Raise();
}
}
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);
}
}
RESPONSES
Listeners are components that subscribe to an event and fire UnityEvent responses. No code required.
Add Component → Game Events Toolkit → [Type] Game Event Listener
Drag the ScriptableObject into the Game Event field.
Add entries to Response (UnityEvent) just like a button.
Game Events Toolkit → Void Game Event Listener
Game Events Toolkit → Float Game Event Listener
Game Events Toolkit → String Game Event Listener
Game Events Toolkit → Bool Game Event Listener
REFERENCE
Quick reference of all included types.
TOOLS
Every ScriptableObject event shows extended information in the Inspector during Play Mode.
MONITORING
An editor window that shows all active events in the scene with real-time information.
DEVELOPMENT
string DescriptionEvent description (read-only).
string TypeNameType name ("Void", "Float"…).
int ListenerCountNumber of registered listeners.
void Raise()Raises the event to all registered listeners.
void RegisterListener(IGameEventListener)Registers a void listener.
void UnregisterListener(IGameEventListener)Unregisters a void listener.
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.
IGameEventListenerInterface for void listeners. Method: OnEventRaised()
IGameEventListener<T>Interface for typed listeners. Method: OnEventRaised(T value)
EXTENSION
Creating a custom event type requires just 2 one-liner classes.
using UnityEngine;
using GameEventsToolkit;
[CreateAssetMenu(menuName = "Game Events Toolkit/Events/Color Event")]
public class ColorGameEvent : GameEvent<Color>
{
public override string TypeName => "Color";
}
using GameEventsToolkit;
using UnityEngine;
public class ColorGameEventListener
: BaseGameEventListener<ColorGameEvent, Color> { }
GUIDE
PROJECT
The asset is organized with Assembly Definitions to separate runtime and editor code.
Runtime Assembly Definition. Auto-referenced, no external dependencies.
Editor Assembly Definition. References the runtime, Editor platform only.
SUPPORT
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.
Runtime information only appears during Play Mode. Select the event asset in the Project and enter Play Mode.
The debugger shows events that exist as assets in the project. Make sure the ScriptableObjects are created and not hidden by HideFlags.
Add using GameEventsToolkit; at the top of your script. If you use your own Assembly Definitions, add a reference to GameEventsToolkit.Runtime.
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.
Yes. Inherit from GameEvent<T> for the event and from BaseGameEventListener<TEvent, TValue> for the listener. See the Extending the system section.