Merge pull request #19481 from peppy/fix-skin-migration

Fix previous skins not loading due to namespace changes
This commit is contained in:
Salman Ahmed 2022-07-30 21:56:28 +03:00 committed by GitHub
commit 998e3b74d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)