Home » Event Propagators Released on the Asset Store

Event Propagators Released on the Asset Store

Event PropagatorsEvent Propagators is a simple solution for forwarding Unity callbacks via events (both native and Unity Events) to be used by other components. The purpose of this is to support better decoupling of your components. Event Propagators allows you to handle the callbacks in one place and react to them in another place(s).

Version 1.0 contains propagators for OnEnable(), OnDisable(), and OnDestroy() callbacks.

Version 1.1 (currently pending for review) also includes propagators for animation events.

Event Propagators is a free asset, which provides modular functionality in various cases. For instance, you can add a OnDestroyPropagatorN component to a GameObject in runtime and launch an event callback like this:

gameObject.AddComponent<OnDestroyPropagatorN>().Destroyed += (sender, args) => /* callback */;

Go grab it here and tell me what you think about it! If you want to know more about why and how to use events, check out my article on events.

Update: Also check out Collision Propagators, which is built upon the same principles as Event Propagators!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.