diff --git a/SpineViewer/Spine/Implementations/SkeletonConverter/SkeletonConverter38.cs b/SpineViewer/Spine/Implementations/SkeletonConverter/SkeletonConverter38.cs index 7db42cb..01c018e 100644 --- a/SpineViewer/Spine/Implementations/SkeletonConverter/SkeletonConverter38.cs +++ b/SpineViewer/Spine/Implementations/SkeletonConverter/SkeletonConverter38.cs @@ -51,6 +51,17 @@ namespace SpineViewer.Spine.Implementations.SkeletonConverter [RotateMode.ChainScale] = "chainScale", }; + private static readonly Dictionary AttachmentTypeJsonValue = new() + { + [AttachmentType.Region] = "region", + [AttachmentType.Boundingbox] = "bounding", + [AttachmentType.Mesh] = "mesh", + [AttachmentType.Linkedmesh] = "linkedmesh", + [AttachmentType.Path] = "path", + [AttachmentType.Point] = "point", + [AttachmentType.Clipping] = "clipping", + }; + private BinaryReader reader = null; private JsonObject root = null; private bool nonessential = false; @@ -298,7 +309,7 @@ namespace SpineViewer.Spine.Implementations.SkeletonConverter var name = reader.ReadStringRef() ?? keyName; var type = (AttachmentType)reader.ReadByte(); attachment["name"] = name; - attachment["type"] = type.ToString(); + attachment["type"] = AttachmentTypeJsonValue[type]; switch (type) { case AttachmentType.Region: diff --git a/SpineViewer/Spine/Implementations/SkeletonConverter/SkeletonConverter41.cs b/SpineViewer/Spine/Implementations/SkeletonConverter/SkeletonConverter41.cs index bf25958..c08316a 100644 --- a/SpineViewer/Spine/Implementations/SkeletonConverter/SkeletonConverter41.cs +++ b/SpineViewer/Spine/Implementations/SkeletonConverter/SkeletonConverter41.cs @@ -52,9 +52,9 @@ namespace SpineViewer.Spine.Implementations.SkeletonConverter private static readonly Dictionary AttachmentTypeJsonValue = new() { [AttachmentType.Region] = "region", - [AttachmentType.Boundingbox] = "boundingBox", + [AttachmentType.Boundingbox] = "boundingbox", [AttachmentType.Mesh] = "mesh", - [AttachmentType.Linkedmesh] = "linkedMesh", + [AttachmentType.Linkedmesh] = "linkedmesh", [AttachmentType.Path] = "path", [AttachmentType.Point] = "point", [AttachmentType.Clipping] = "clipping", diff --git a/SpineViewer/Spine/Implementations/SkeletonConverter/SkeletonConverter42.cs b/SpineViewer/Spine/Implementations/SkeletonConverter/SkeletonConverter42.cs index 47aa5d0..891bf31 100644 --- a/SpineViewer/Spine/Implementations/SkeletonConverter/SkeletonConverter42.cs +++ b/SpineViewer/Spine/Implementations/SkeletonConverter/SkeletonConverter42.cs @@ -52,7 +52,7 @@ namespace SpineViewer.Spine.Implementations.SkeletonConverter [AttachmentType.Region] = "region", [AttachmentType.Boundingbox] = "bounding", [AttachmentType.Mesh] = "mesh", - [AttachmentType.Linkedmesh] = "linkedMesh", + [AttachmentType.Linkedmesh] = "linkedmesh", [AttachmentType.Path] = "path", [AttachmentType.Point] = "point", [AttachmentType.Clipping] = "clipping",