Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

[RELEASED] (Whisper) Scene Messenger v2 - A Faster Messenger for Unity

Discussion in 'Assets and Asset Store' started by HandOfPriam, Feb 9, 2015.

  1. HandOfPriam

    HandOfPriam

    Joined:
    Aug 19, 2010
    Posts:
    34
    Hi everyone! I'd like announce the recent update and redesign of the (Whisper) Scene Messenger!

    Unity has a robust messaging system that allows communication between GameObjects. While this system is functional, it suffers from two major hiccups. First, Unity's messenger uses string reflection, which is far slower than a normal method callback. Second, Unity's messenger requires you to keep your GameObjects structured as a specific parent-child tree--in order to send messages, an object must be a parent or child of another sender or receiver.

    The (Whisper) Scene Messenger is a delegate based scene management and messaging tool designed to keep your scene organized and your code clean, fast, and loosely-coupled. Simply add the messenger prefab and register your message functions with the messenger. The (Whisper) Scene Messenger includes a message class that can handle any number of parameters, without needing several function overloads. Instead of defining a fixed number of callbacks, the system uses a Message class which can be constructed with any number of parameters of any type. A type safe accessor is provided to simplify using the included Message class. A lot of work has been done to make the system as robust, reliable, and easy to use as possible without sacrificing speed.

    A brand new feature called "Message Posting" has been added to the v2 release of the (Whisper) Scene Messenger! Occasionally, there may be a need to send a specific message every frame, for instance a timer update or position update. By posting a message once to the (Whisper) Scene Messenger, these messages can be sent every frame without cluttering the call stack with extra function calls. This feature is only available in the full version of the (Whisper) Scene Messenger.

    The (Whisper) Scene Messenger is currently on the Asset Store for $15. A free version (with some limitations noted on the store page) is also available. A demo is available on my website. Both versions support Unity 4.3.3 and higher.

    (Whisper) Scene Messenger: http://u3d.as/content/singularity-productions/-whisper-scene-messenger/7Wj
    (Whisper) Scene Messenger [Lite]: http://u3d.as/content/singularity-productions/-whisper-scene-messenger-lite-/8s3

    Website and Demo: http://www.singularityproductions.com/tools/messenger/messenger.html

    If you have any questions, shoot me an email or PM me on here. And be sure to follow Singularity Productions on Facebook and Twitter for the latest updates!

    Twitter: https://twitter.com/ColinCammarano
    Facebook: www.facebook.com/SingularityProductions
     
    Last edited: Feb 9, 2015
  2. shaderop

    shaderop

    Joined:
    Nov 24, 2010
    Posts:
    942
    Congratulations on releasing version 2.0!

    But if I may offer a suggestion: It might encourage people to try and buy this asset if you were to make the documentation available freely and separately. Right now I have no way of knowing how the API looks like without downloading the whole shebang from the asset store, which might be a step two many for some (and it was for me).

    The web demo is nice, but it didn't to communicate any useful information to me regarding the actual working for this asset. And it was also huge! I managed to answer a couple of emails while waiting for it finish downloading.

    Good luck.
     
  3. HandOfPriam

    HandOfPriam

    Joined:
    Aug 19, 2010
    Posts:
    34
    Thanks for the feedback! I'll go ahead and update my website with Doxygen documentation for the lite version, since that has all of the main functionality.
     
  4. BlackManatee

    BlackManatee

    Joined:
    Jun 13, 2013
    Posts:
    71
    Hi, Colin,

    I've upgraded a very simple application of WSM from Unity 4 to Unity 5. I'm getting an error that "SceneMessenger" does not exist; sure enough, the SceneMessenger file has been removed in the latest version. I shifted it to SceneMessengerManager, and now I'm getting a message that SceneMessengerManager doesn't contain a definition for PrepareMessage.

    Obviously, the code has changed in important ways, but I don't see anything in the documentation (I have the full version) that will allow me to quickly discern what's changed and how to address it. The only note in the (non Doxygen) documentation talks about changing all calls to the "new singleton pattern."

    I've sent an e-mail with the code snippet to your e-mail address. It's just a couple of lines, which were incredibly simple, but now that the system has changed, I'm not sure what's wrong. Is there any document that explains what's new with Unity 5, or how to handle sending messages now?
    Thanks--
    ~~Bill

    _____________
    Bill Pomidor, MD
    Brainstorm Rising, LLC
    Immersive, engaging solutions for medical education and health awareness.
     
  5. HandOfPriam

    HandOfPriam

    Joined:
    Aug 19, 2010
    Posts:
    34
    Hi Bill, I responded to your email. I deprecated the "PrepareMessage" method in favor of a new method name, which is "WhisperMessage." This is essentially the same as the previous function, with a few tweaks to the internal logic. The "updating guide" that was supposed to be in the v2.0.1 update never showed up because the upload never completed (back with the older, more finicky, Asset Store Tools). I am making sure this update goes up now. Hopefully the email I sent back with my code snippets sorts your issue out.