Unity Asset - Particle Event Dispatcher

Participle is a Unity asset that makes it easy to script creative and novel behaviors for particle effects. At its core, Participle is a flexible event dispatcher that offers convenient access to the state of individual particles within Unity’s Shuriken particle system. It makes it simple to construct effects that respond to fundamental events, such as particle birth and death, as well as more sophisticated conditions like the length of time a particle has lived or the distance it has traveled.

Participle offers a custom inspector that makes setting up basic and conditional trigger events straightforward. It also offers a full featured programming API.

Features

Participle includes a set of built-in event triggers. Each of these triggers apply on a per particle basis. Using the custom inspector you can quickly set-up global event triggers that apply to every particle in the system. Using the programming API, you can set-up specific triggers for individual particles.

  • Built-in event triggers:
    • Birth
    • Death
    • Time lived
    • Distance traveled
    • Remaining lifetime
    • Size
    • Distance to a specified transform
    • Every frame
  • Trigger modes:
    • OneShot – the event triggers once at the specified value.
    • Repeat – the event is triggered each time the target value is reached. May repeat for a specified count or indefinitely (e.g. each time a particle is 10 units from a specified transform).
    • Repeat By Increment – the event is triggered at an initial threshold and subsequently at an increasing value (e.g., every 2 units a particle has traveled => 2, 4, 6, 8, etc.).
    • Repeat By Decrement – the event is triggered at an initial threshold and subsequently at a decreasing value (e.g., 5 seconds before a particle dies and every second until its death => 5, 4, 3, 2, 1, 0).
  • Custom event triggers – enables the user to plug their own evaluation code into the dispatcher to determine the conditions that will cause an event to be dispatched.
  • The ability to store and retrieve arbitrary application data on a per particle basis. This provides an extremely flexible capability to customize particle behavior in combination with events.
  • Full featured scripting API that offers methods for:
    • Adding/removing global event triggers
    • Adding/removing per particle event triggers
    • Enabling/disabling event dispatch on a per particle basis
    • Storing/retrieving application data on a per particle basis
    • Getting dispatcher information about the particle system, such as the number of living particles and the number of deceased particles
    • Getting dispatcher information about individual particles, such as time lived and distance traveled
    • Getting dispatcher information about event triggers, such as the number of times a given trigger has been activated
    • Adding game object attachments that follow individual particles.
  • Lots of examples!
  • An experimental run time Dashboard UI that allows you to see the current state of every trigger for every particle. Good for gaining insight into your trigger event behaviors and debugging.