diff --git a/osu.Game/Skinning/LegacySkinExtensions.cs b/osu.Game/Skinning/LegacySkinExtensions.cs index d8fb1fa664..6e8276c01e 100644 --- a/osu.Game/Skinning/LegacySkinExtensions.cs +++ b/osu.Game/Skinning/LegacySkinExtensions.cs @@ -54,9 +54,16 @@ namespace osu.Game.Skinning IEnumerable getTextures() { + ISkin lookupSource = null; + for (int i = 0; true; i++) { - if ((texture = source.GetTexture($"{componentName}{animationSeparator}{i}", wrapModeS, wrapModeT)) == null) + string frameName = $"{componentName}{animationSeparator}{i}"; + + // ensure all textures are retrieved from the same skin source. + lookupSource ??= source.FindProvider(s => s.GetTexture(frameName, wrapModeS, wrapModeT) != null); + + if ((texture = lookupSource?.GetTexture(frameName, wrapModeS, wrapModeT)) == null) break; yield return texture;