Migrate to System.Text.Json in Live2D exporter

- [exp3.json] Fixed format of Blend values (there should be strings according to the official specification)
- Fixed BlendType enum
This commit is contained in:
VaDiM
2026-06-19 21:11:55 +03:00
parent 92602fc4a9
commit 7b7907f2eb
14 changed files with 188 additions and 105 deletions
@@ -1,5 +1,6 @@
using AssetStudio;
using Newtonsoft.Json;
using CubismLive2DExtractor.CubismJsonConverters;
using System.Text.Json.Serialization;
namespace CubismLive2DExtractor.CubismUnityClasses
{
@@ -33,6 +34,7 @@ namespace CubismLive2DExtractor.CubismUnityClasses
public float AngleScale { get; set; }
public float Weight { get; set; }
public CubismPhysicsSourceComponent SourceComponent { get; set; }
[JsonConverter(typeof(MyJsonConverterBool))]
public bool IsInverted { get; set; }
}
@@ -50,6 +52,7 @@ namespace CubismLive2DExtractor.CubismUnityClasses
public float AngleScale { get; set; }
public float Weight { get; set; }
public CubismPhysicsSourceComponent SourceComponent { get; set; }
[JsonConverter(typeof(MyJsonConverterBool))]
public bool IsInverted { get; set; }
}
@@ -71,7 +74,7 @@ namespace CubismLive2DExtractor.CubismUnityClasses
public sealed class CubismPhysics : MonoBehaviour
{
[JsonProperty("_rig")]
[JsonPropertyName("_rig")]
public CubismPhysicsRig Rig { get; set; }
}
}