Skip to content

Commit 998e3b7

Browse files
authored
Merge pull request #19481 from peppy/fix-skin-migration
Fix previous skins not loading due to namespace changes
2 parents 498c796 + 93b783d commit 998e3b7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

osu.Game/Skinning/Skin.cs

+7
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,13 @@ protected Skin(SkinInfo skin, IStorageResourceProvider? resources, IResourceStor
108108
try
109109
{
110110
string jsonContent = Encoding.UTF8.GetString(bytes);
111+
112+
// handle namespace changes...
113+
114+
// can be removed 2023-01-31
115+
jsonContent = jsonContent.Replace(@"osu.Game.Screens.Play.SongProgress", @"osu.Game.Screens.Play.HUD.DefaultSongProgress");
116+
jsonContent = jsonContent.Replace(@"osu.Game.Screens.Play.HUD.LegacyComboCounter", @"osu.Game.Skinning.LegacyComboCounter");
117+
111118
var deserializedContent = JsonConvert.DeserializeObject<IEnumerable<SkinnableInfo>>(jsonContent);
112119

113120
if (deserializedContent == null)

0 commit comments

Comments
 (0)