fix bug
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user