Skip to content

sponticelli/LiteNinja-EventBus

Repository files navigation

LiteNinja-EventBus

A Unity Event Bus for Unity.

What is an Event Bus? An event bus is a way to communicate between components of a game.

Usage

Events

public class MyEvent : IEvent
{
    public int Value { get; set; }
}

Event Bus

There are several ways to use LiteNinja-EventBus.

Global Event Bus

The global event bus is a static that can be accessed from anywhere in the game.

GlobalEventBus.Subscribe<MyEvent>(OnMyEvent);

GlobalEventBus.Publish(new MyEvent { Value = 1 });

Global Event Bus Generic

Simple Event Bus

ScriptableObject Event Bus

Publishers

Subscribers

It is responsibility of the subscriber to unsubscribe to the event bus.

About

A simple event bus for Unity3D

Topics

Resources

License

MIT and 2 other licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md
Unknown
LICENSE.meta

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages