public static glTF_VCAST_vci_SpringBone glTF_VCAST_vci_spring_bone_Deserializevci_springBones_ITEM(JsonNode parsed) { var value = new glTF_VCAST_vci_SpringBone(); foreach (var kv in parsed.ObjectItems()) { var key = kv.Key.GetString(); if (key == "stiffiness") { value.stiffiness = kv.Value.GetSingle(); continue; } if (key == "gravityPower") { value.gravityPower = kv.Value.GetSingle(); continue; } if (key == "gravityDir") { value.gravityDir = glTF_VCAST_vci_spring_bone_Deserializevci_springBones__gravityDir(kv.Value); continue; } if (key == "dragForce") { value.dragForce = kv.Value.GetSingle(); continue; } if (key == "center") { value.center = kv.Value.GetInt32(); continue; } if (key == "hitRadius") { value.hitRadius = kv.Value.GetSingle(); continue; } if (key == "bones") { value.bones = glTF_VCAST_vci_spring_bone_Deserializevci_springBones__bones(kv.Value); continue; } if (key == "colliderIds") { value.colliderIds = glTF_VCAST_vci_spring_bone_Deserializevci_springBones__colliderIds(kv.Value); continue; } } return(value); }
public static void Serialize_vci_springBones_ITEM(JsonFormatter f, glTF_VCAST_vci_SpringBone value) { f.BeginMap(); if (true) { f.Key("stiffiness"); f.Value(value.stiffiness); } if (true) { f.Key("gravityPower"); f.Value(value.gravityPower); } if (value.gravityDir != null) { f.Key("gravityDir"); Serialize_vci_springBones__gravityDir(f, value.gravityDir); } if (true) { f.Key("dragForce"); f.Value(value.dragForce); } if (true) { f.Key("center"); f.Value(value.center); } if (true) { f.Key("hitRadius"); f.Value(value.hitRadius); } if (value.bones != null && value.bones.Length >= 0) { f.Key("bones"); Serialize_vci_springBones__bones(f, value.bones); } if (value.colliderIds != null && value.colliderIds.Length >= 0) { f.Key("colliderIds"); Serialize_vci_springBones__colliderIds(f, value.colliderIds); } f.EndMap(); }