Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Released] Mailman - Pooled Event System

Discussion in 'Assets and Asset Store' started by Babooshka, Jul 10, 2023.

  1. Babooshka

    Babooshka

    Joined:
    May 25, 2018
    Posts:
    2
    Mailman is a plugin that simplifies inter-object communication by providing an easy-to-use messaging system. It allows developers to create message types (mail) and listeners to handle them, enabling objects to communicate with each other without the need for explicit references.

    This decouples objects and makes it easier to manage the interactions between them, especially when a project base starts to grow. Mailman also provides features such as prioritization to further enhance the communication between objects. With Mailman, developers can create more flexible and modular code, leading to more efficient and maintainable projects.

    One of the most unique features of Mailman is the in-built custom mail editor, which uses code generation to allow developers to make and change their mail classes without having to program anything.

    Overall, Mailman is a powerful tool for developers looking to simplify and optimize their inter-object communication.

    Documentation
    Store Page

    If you have any question, feel free to reach out to us!

    Support: support@bigbench.games

    Website: bigbench.games



    Change Log:
    1.0.1

    • QOL Improvements:
      • Added the ability to make multiple duplications of mail types by selecting the mail type in the editor and clicking duplicate and filling out the popup.
    • Bugs:
      • Fixed a niche bug where if the dispatch of mail A resulted in the calling of a dispatch of mail B which in turn added a listener to mail type A, an infinite loop would occur resulting in a stack overflow crash.

    1.0.0

    • Inital release
     
    Last edited: Sep 15, 2023
  2. Setmaster

    Setmaster

    Joined:
    Sep 2, 2013
    Posts:
    239
    Lets say I have 100 receivers, is there a way to know if all of them got the message?
     
  3. Babooshka

    Babooshka

    Joined:
    May 25, 2018
    Posts:
    2
    Hi,

    Whilst there is currently no way to know if all the subscribers of a mail type have received a message, also long as the receiver GameObject has subscribed to the mail type and hasn't been destroyed, it should always receive the message. Mailman will only skip or not dispatch to receivers whose mail type function callbacks are null, which only really happens if the GameObject has been destroyed without unsubscribing first.

    Thanks.