Observables
A value that tells its subscribers when it changes, so a score and everything showing it stay in step.
A score changes and the scoreboard redraws. A door unlocks and three things react. Written by hand, that is a list of things to update and a bug the first time one is forgotten.
Udonite Observables is that pattern done once, in ordinary C#: a value, a list or a dictionary that tells whoever subscribed when it really changes.
What you get
- Values that notify on change, and stay quiet when set to the same value again.
- Lists and dictionaries that report additions, removals and replacements.
- Read-only views, so a behaviour can watch a value without being allowed to change it.
- Predictable behaviour when subscribers come and go during a notification.
It comes with every Udonite licence and installs from Udonite > Open Window > Packages in Unity.
The full documentation comes with the licence and opens here once you sign in.