Replace tangled Unity coroutines with readable reactive streams that can return values and catch errors
Handle button clicks, frame updates, and sensor input as composable event streams in a Unity game
Detect complex input patterns like double-clicks by composing timing checks over click event streams
Manage parallel network requests with cancellation and progress tracking in a mobile Unity project
Author now recommends the successor library Cysharp/R3 for new projects, UniRx is in maintenance mode.
UniRx is a library for Unity game developers that makes it easier to write code that responds to events and handles asynchronous operations. Unity's built-in approach to asynchronous work uses a mechanism called coroutines, but coroutines have real limitations: they cannot return values and cannot handle exceptions, which tends to produce tangled, hard-to-maintain code. UniRx provides a different approach based on Reactive Extensions (Rx), a programming pattern originally from the .NET world. The core idea is to treat events as streams that you can filter, combine, delay, and transform using a query style that looks similar to database queries. In practice, this means things like button clicks, game loop updates (every frame), sensor input from devices like Kinect or VR controllers, and network responses can all be treated as observable event streams. You write rules about how those streams should behave, and the library handles the details. For example, detecting a double-click means watching a stream of click events and checking whether two arrive within 250 milliseconds. The library also makes network requests cancellable, supports running multiple requests in parallel, and includes progress tracking. UniRx supports PC, Mac, Android, iOS, WebGL, and Windows Store. It was written to work around Unity-specific platform issues, particularly compatibility problems with iOS's IL2CPP compilation mode that the official .NET Rx library did not handle. The library is free and was available through the Unity Asset Store. The README opens with an important note: the author now distributes an evolved successor called Cysharp/R3 and recommends using that instead of UniRx. Async/await integration was also separated into a companion project called UniTask after version 7.0. The full README is longer than what was shown.
← neuecc on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.