RimuruDev / Unity-ReactivePropertyConverter

ReactivePropertyConverter for ReactiveProperty -> For small projects, so as not to import UniRx or R3.

Repository from Github https://github.comRimuruDev/Unity-ReactivePropertyConverterRepository from Github https://github.comRimuruDev/Unity-ReactivePropertyConverter

Unity -> Reactive Property Converter

ReactivePropertyConverter for ReactiveProperty

Dependency:

{
  "dependencies": {
    "com.unity.nuget.newtonsoft-json": "3.2.1",
 }
}

Example

    [Serializable]
    public class HalloweenUserProgress
    {
        [JsonProperty("Currency")] 
        [JsonConverter(typeof(ReactivePropertyConverter))]
        public ReactiveProperty<int> Currency = new();

        [JsonProperty("LevelProgress")] 
        [JsonConverter(typeof(ReactivePropertyConverter))]
        public ReactiveProperty<List<LevelProgress>> LevelProgress = new();
    }

Before use [JsonConverter(typeof(ReactivePropertyConverter))]

image

After use [JsonConverter(typeof(ReactivePropertyConverter))]

image

About

ReactivePropertyConverter for ReactiveProperty -> For small projects, so as not to import UniRx or R3.

License:MIT License


Languages

Language:C# 100.0%