Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 692 Bytes

File metadata and controls

25 lines (20 loc) · 692 Bytes

LiveData for Unity

A lightweight, type-safe reactive data holder inspired by Android's LiveData — but made for Unity (C#).
This lets you observe data changes safely, without needing manual event unsubscriptions.

✨ Key Features:

  • Zero memory leaks: automatic cleanup of destroyed MonoBehaviours
  • React to value changes with one line: Observe(this, value => { ... })
  • Immediately receives the current value on subscribe
  • Ideal for MVVM, clean architecture, UI binding, and reactive programming in Unity

🚀 Example:

public MutableLiveData<int> Health = new();
// ...
Health.SetValue(lives);
player.Health.Observe(this, health =>
{
    // ...
});