diff --git a/AssetStudioUtility/CubismLive2DExtractor/Live2DExtractor.cs b/AssetStudioUtility/CubismLive2DExtractor/Live2DExtractor.cs index d8b0a6f5..c312fb6f 100644 --- a/AssetStudioUtility/CubismLive2DExtractor/Live2DExtractor.cs +++ b/AssetStudioUtility/CubismLive2DExtractor/Live2DExtractor.cs @@ -99,7 +99,7 @@ public static void ExtractLive2D(IGrouping assets, s } //motion - var motions = new JArray(); + var motions = new SortedDictionary(); if (gameObjects.Count > 0) { @@ -205,11 +205,8 @@ public static void ExtractLive2D(IGrouping assets, s } json.Meta.TotalUserDataSize = totalUserDataSize; - motions.Add(new JObject - { - { "Name", animation.Name }, - { "File", $"motions/{animation.Name}.motion3.json" } - }); + var motionPath = new JObject(new JProperty("File", $"motions/{animation.Name}.motion3.json")); + motions.Add(animation.Name, new JArray(motionPath)); File.WriteAllText($"{destMotionPath}{animation.Name}.motion3.json", JsonConvert.SerializeObject(json, Formatting.Indented, new MyJsonConverter())); } } @@ -307,7 +304,7 @@ public static void ExtractLive2D(IGrouping assets, s { Moc = $"{modelName}.moc3", Textures = textures.ToArray(), - Motions = new JObject { { "", motions } }, + Motions = JObject.FromObject(motions), Expressions = expressions, }, Groups = groups.ToArray()