1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 08:52:56 +08:00

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 try
{ {
string jsonContent = Encoding.UTF8.GetString(bytes); 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); var deserializedContent = JsonConvert.DeserializeObject<IEnumerable<SkinnableInfo>>(jsonContent);
if (deserializedContent == null) if (deserializedContent == null)