Skip to content

Latest commit

 

History

History
29 lines (24 loc) · 675 Bytes

README.md

File metadata and controls

29 lines (24 loc) · 675 Bytes

Unity ReactiveProperty Helper

How to use

[Serializable]
public class CurrencyData
{
    public ReactiveProperty<int> SoftCurrency { get; private set; }
    public ReactiveProperty<int> HardCurrency { get; private set; }

    public CurrencyData()
    {
        SoftCurrency = new ReactiveProperty<int>();
        HardCurrency = new ReactiveProperty<int>();
    }
}

Newtonsoft.Json

    [Serializable]
    public class CurrencyStorage
    {
        [JsonProperty] public ReactiveProperty<int> SoftCurrency { get; private set; } = new();

        [JsonProperty] public ReactiveProperty<int> HardCurrency { get; private set; } = new();
    }