MagicOnion is a unified RPC and real-time communication framework for .NET and Unity that uses gRPC as its underlying transport.
MagicOnion addresses the need for seamless communication between .NET clients and servers without requiring Protocol Buffers schema files. It treats C# interfaces as protocol schemas, allowing code to be shared directly between projects. The framework builds on gRPC's fast binary transport over HTTP/2 but eliminates the friction of maintaining separate .proto definitions. It supports both request-response RPC patterns and bi-directional streaming through its StreamingHub feature, which enables servers to broadcast data to multiple connected clients.
Teams should adopt MagicOnion when building .NET-to-.NET or Unity-to-.NET systems where code sharing is valuable and real-time communication is needed. It suits microservices architectures, desktop applications targeting WinForms or WPF, and game backends using Unity. The framework can replace gRPC where the overhead of Protocol Buffers is unwelcome, SignalR or Socket.io for real-time features, or traditional WCF for RPC needs. It supports a broad range of platforms including .NET Framework 4.6.1 through .NET 8, Unity 2022.3 LTS and newer, and targets Windows, macOS, iOS, and Android with both IL2CPP and Mono runtimes. The server requires .NET 8 or later.
The project maintains active build and release automation with separate canary builds alongside standard releases. Development activity shows consistent attention to both stability and forward compatibility across the supported platform matrix.