Yes, but what are you doing with these events? Why isn’t it just a scene ID on the event that is then targetting specific data structures instead of some if/else thing?
The issue is that if I add this to the EventBus then everyone pays the penalty for checking filters even when 99% of use-cases will not use the filters. Instead of just delivering the messages, I need to also check each one to see if it’s filtered. There is no guarantee of any kind of efficiency because these are O(N) and may even have side effects.
It also seems like you could have bound the events to scene objects that do the filtering for you and call whatever they are going to call… then at least you are aware of the inefficiency and could even do something smarter than “iterate over 1000 listeners to see which one matches the filter”… because what you really want is a scene ID dispatch.