This commit is contained in:
ww-rm
2025-03-21 01:40:42 +08:00
parent 2535a9ebf9
commit 176e5db4d9
2 changed files with 21 additions and 2 deletions

View File

@@ -1093,6 +1093,25 @@ namespace SpineViewer.Spine.Implementations.SkeletonConverter
writer.WriteVarInt(name2idx[(string)name]);
}
public override JsonObject ReadJson(string jsonPath)
{
// replace 3.8.75 to another version to avoid detection in official runtime
var root = base.ReadJson(jsonPath);
var skeleton = root["skeleton"].AsObject();
var version = (string)skeleton["spine"];
if (version == "3.8.75") skeleton["spine"] = "3.8.76";
return root;
}
public override void WriteJson(JsonObject root, string jsonPath)
{
// replace 3.8.75 to another version to avoid detection in official runtime
var skeleton = root["skeleton"].AsObject();
var version = (string)skeleton["spine"];
if (version == "3.8.75") skeleton["spine"] = "3.8.76";
base.WriteJson(root, jsonPath);
}
public override JsonObject ToVersion(JsonObject root, Version version)
{
root = version switch