Thank you for the quick reply.
Maybe I can clarify. I don’t have an issue with the basic use case of Signals allowing anyone to listen nor do I have a too-many-mediators problem. My specific question is how to provide Mediator-specific data from a Model without having to broadcast the data to every Mediator of the same type.
I have an implementation where I have a model that stores a set of Unity camera instances. In my Mediator OnRegister, I broadcast a Signal in order to retrieve one of these camera instances. the executed Command accesses the Model, finds the proper Camera instance and dispatches another Signal with the Camera instance.
If I use the ListensTo attribute in my Mediator, every Mediator instance of this type will receive this camera instance even if they already dispatched their own signal and received a camera instance already. While I don’t have a lot of these Mediator instances (about 5-10 at a time), it just seems inefficient for every Mediator instance to receive a new camera instance and have to process whether they are the designated target for it.
Is there an easier way to return model data back to just one of these Mediator instances? I suppose I could manually add/remove the listener once the camera instance has been supplied or I could use the lambda function hack to get the data back to just the one Mediator I want?
As for your suggestion about using a single Mediator to mediate a set of Views, what’s the best way to provide the refs of multiple views to the Mediator? My views are instantiated dynamically at runtime. Can Mediators be singletons or would the Mediator inject a singleton Model that is loaded with each View ref and access it directly?
Thank you for your help!