Event and message dispatching is a critical part of any game. Message dispatching ensures that game objects are able to communicate in a consistent, reliable, and efficient way.
Dispatcher does this and makes it easy too! Simply tell the Dispatcher what an object wants to listen for. When another object sends that message to the Dispatcher, the Dispatcher will ensure all the "listeners" are notified.
Documentation
Forum
Web Demo
Dispatch basic messages with two simple lines:
MessageDispatcher.AddListener("LEVEL_WON", OnLevelWon);
MessageDispatcher.SendMessage("LEVEL_WON");
Features
* Create and send custom message types
* Send messages containing custom data
* Send messages to everyone
* Send messages to objects based on their name
* Send messages to objects based on their tag
* Send messages to objects based on a string
* Send a message immediately
* Send a message at the next frame
* Schedule a message for the future
* Connect multiple listeners to a single message
* High performance
Bonus: Includes a 'Profiler' for testing performance! Use this with any of your C# scripts.
Unity and Unity Pro versions supported.
Supports Unity 3.4+.
Support: support@ootii.com
Refund policy
Event Dispatcher - 1.646 - Exposed access to the Messages list - Exposed access to the Handlers dictionary Version 1.645 - Sync support files Version 1.644 - Sync support files - Removed warning messages Version 1.643 - Sync support files Version 1.642 - Added support for global serialization Version 1.641 - Fixed build error Version 1.64 - Major folder changes for Assembly Definition Files - https://ootiigames.com/?page_id=1230 Version 1.63 - Updated support for Unity 2018 UWP Version 1.62 - Added default 'handled' to SendMessage() Version 1.61 - Fixed issue with UWP Version 1.60 - Added support for new Unity directives Version 1.59 - Added option to send unhandled warnings Version 1.58 - Minor UI improvement - Sync framework Version 1.57 - Fixed issue with UWP reflection Version 1.56 - Sync framework Version 1.55 - Report unhandled message in editor only - Moved Message.cs to Framework Version 1.54 - Synchronize Framework Version 1.53 - Synchronize Framework Version 1.52 - Synchronize framework Version 1.51 - Added SendMessageData function - Fixed listener release duplication Version 1.5 - Added "Release()" to IMessage - Improved release code to call message Version 1.46 - Sync framework files Version 1.45 - Cleaned up memory allocations Version 1.44 - Updated framework - Updated helpers - Removed Unity warnings Version 1.43 - Minor update for Framework Version 1.42 - Fixed bug when sending 'Next Update' Version 1.4.1 - Added requested SendMessage calls - Fixed a bug with delayed messages Version 1.4 - Updated some API calls U5 changed Version 1.3 - Updated folders to work with other assets easier Version 1.2 Added - Delegate to capture unhandled messages. By assigning a function to the 'MessageNotHandled' property, any messages that doesn't have a listener can be captured. This is useful for debugging. Version 1.12 Fixed - Small bug in Sample.cs file Version 1.1 Added - Support for caching the add and removal of listeners. Added - Support for ignoring the cacheing the add and removal of listeners. Version 1.0: Fix - Dispatcher cleans up correctly when listeners are removed. Added - Profiler for testing performance