Variables and Events exposes methods that returns [`IObservables`](https://docs.microsoft.com/en-us/dotnet/api/system.iobservable-1?view=netframework-4.8). Atom Variables exposes `ObserveChange` and `ObserveChangeWithHistory`, while Atom Events exposes `Observe`. This makes it possible to use Unity Atoms seamlessly together with [UniRx](https://github.com/neuecc/UniRx).
## Simple example
The `HealthBar.cs` script from the [Basic tutorial](./basic-tutorial) could be rewritten like this using UniRx:
GetComponent<Image>().fillAmount = 1.0f * health / _maxHealth.Value;
});
}
}
```
## Advanced example
Here is another example of a `PlayerMove.cs` script that is a little bit more advanced. Horizontal and vertical input is only getting a value from the `Input` class as long as the UI state is in the state of `_uiStatePlaying`.