Fix previous skins not loading due to namespace changes

This commit is contained in:
Dean Herbert 2022-07-31 03:25:38 +09:00
parent 498c796c81
commit 93b783d9ea

View File

@ -108,6 +108,13 @@ namespace osu.Game.Skinning
try
{
string jsonContent = Encoding.UTF8.GetString(bytes);
// handle namespace changes...
// can be removed 2023-01-31
jsonContent = jsonContent.Replace(@"osu.Game.Screens.Play.SongProgress", @"osu.Game.Screens.Play.HUD.DefaultSongProgress");
jsonContent = jsonContent.Replace(@"osu.Game.Screens.Play.HUD.LegacyComboCounter", @"osu.Game.Skinning.LegacyComboCounter");
var deserializedContent = JsonConvert.DeserializeObject<IEnumerable<SkinnableInfo>>(jsonContent);
if (deserializedContent == null)