Type-safe Unity event system with ScriptableObject channels, DI-ready architecture, and measured high-performance dispatch.Stop wiring unrelated systems together with direct references, static globals, or fragile string events!Messenger is a code-first, type-safe event system for Unity that helps you decouple gameplay, UI, audio, analytics, meta, and service systems without string keys, enum registries, or hard references.Use Messenger as a local event system in pure C#, inject it through your composition root, or share ScriptableObject Channel assets across prefabs and scenes when you want Inspector-friendly communication without singletons.Why choose Messenger:Strongly typed messages for safer refactoring and cleaner APIsExplicit Send(in T) and Signal() flows for payload messages and no-data signalsHigh-performance, low-allocation dispatch with cached signals and benchmarked runtime behaviorFluent subscriptions with a single IDisposable for lifecycle cleanupScriptableObject Channels for cross-scene and cross-prefab messagingOptional logging, exception handling, thread safety, capacity tuning, and custom cache supportDI-friendly IMessenger interface with examples for Zenject, VContainer, Reflex, and pure DIRe-entrancy-safe dispatch with deferred subscribe/unsubscribe during message processingExtensive documentation, 4 sample scenes, 469 tests, benchmarks, and zero external dependenciesMessenger is built for teams that want scalable architecture without heavyweight frameworks: from small projects that need cleaner communication to larger codebases that need predictable behavior, low overhead, and easier testing.Core components:Messenger (runtime event system)Channel (ScriptableObject-based shared messaging)Builder configuration APIIMessenger / ISubscriberILogger / ICache extensibility pointsMain capabilities:Strongly typed publish-subscribe API with no string keys or enum registriesSend(in T) for payload messages and Signal() for cached no-data signalsFluent multi-subscription API returning a single IDisposableOptional logging, exception handling, thread safety, capacity tuning, auto-release capacity, and custom cache supportRe-entrancy-safe dispatch with deferred subscribe/unsubscribe during active message processingDeterministic subscription orderDI examples for Zenject, VContainer, Reflex, and pure C# compositionIncluded content:4 sample scenesBenchmarks and stress tests469 unit tests across 52 test fixturesFull documentationBenchmark snapshot (Apple Silicon, Unity 2022.3.62f3, Mono runtime):Send: up to 11,035,095 ops/sec with 10 subscribersSignal: up to 6,840,452 ops/sec with 10 subscribersDedicated Send/Signal dispatch tests observed 0 GC collections over 10,000 iterationsSupported platforms:WindowsmacOSLinuxAndroidiOSWebGLImportant behavior notes:Message dispatch is exact-type by design, interface/base-type dispatch requires explicit generic typingSignal() is intended for no-data/default-constructible message typesChannel uses an internal default Messenger configuration



