Total Eclipse

Game Development & Consulting

SolarWind Events Unity Plugin

SolarWind Events is an Event System that lets you broadcast and receive event messages among objects of an application. It is a vital component of any game or app, because it allows indirect communication between objects, usually resulting to a better architecture, due to decoupling objects.

Every application should have an event system.SolarWind Events is fast, flexible, promotes best practices that helps your app’s scalability, has a really simple but powerful API, and has been used in real-world apps on multiple platforms.

Features

  • Straightforward, powerful API
  • Local messaging, by listening to specific broadcasters
  • Public messaging, by listening to a global Event Center
  • Custom event objects, carrying any kind of data
  • Customizable priority when notifying listeners
  • Lightweight and fast
  • Filtering based on event properties, or any external conditions
  • Scheduling events for later
  • Powerful utils to handle any type of scenario, including multiple threads

Messaging schemes

The Event system supports two types of messaging schemes:

  • Local messaging
  • Global messaging

Depending on each situation you are using event messaging in, you should choose one of these.

Local Messaging

This is the most common use of the Event system. It makes sense when you have a direct reference to the object that broadcasts the messages. The following example shows a system where an Alarm object subscribes to various AlarmTrigger instances, in order to be notified when a trigger is activated. The following classes represent such as scenario.

Global Messaging

This method is typically better to use for very broad events, that may potentially interest many different listeners, when it is not convenient for each listener to acquire a reference to the dispatching object. Such an example could be a class that detects the focus changes of an application, i.e. when the app gains or loses focus. The following classes represent such as scenario.