Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SkinnableSprite not working #29444

Closed
fuyukiSmkw opened this issue Aug 16, 2024 · 4 comments · Fixed by #29458
Closed

SkinnableSprite not working #29444

fuyukiSmkw opened this issue Aug 16, 2024 · 4 comments · Fixed by #29458
Assignees
Labels
area:skinning priority:0 Showstopper. Critical to the next release.

Comments

@fuyukiSmkw
Copy link

Type

Cosmetic

Bug description

SkinnableSprite cannot show any asset although it exists.

Screenshots or videos

osu_2024-08-16_19-13-55

2024-08-16.19-08-12.mp4

Version

2024.816.0-lazer

Logs

compressed-logs.zip

@cdwcgt
Copy link
Contributor

cdwcgt commented Aug 16, 2024

The first commit where this problem occurred was dcafee7

git reset --hard 657da34 will be fine

I haven't watched it specifically, but it should be the regress of #26249

The following changes can solve the problem

But I don't know if I should do this, because it didn't change it at the beginning, and I don't know why.

diff --git a/osu.Game/Skinning/Skin.cs b/osu.Game/Skinning/Skin.cs
index 3a83815f0e..472cfe4704 100644
--- a/osu.Game/Skinning/Skin.cs
+++ b/osu.Game/Skinning/Skin.cs
@@ -185,7 +185,15 @@ public void UpdateDrawableTarget(SkinComponentsContainer targetContainer)
             {
                 // This fallback is important for user skins which use SkinnableSprites.
                 case SkinnableSprite.SpriteComponentLookup sprite:
-                    return this.GetAnimation(sprite.LookupName, false, false, maxSize: sprite.MaxSize);
+                    var drawable = this.GetAnimation(sprite.LookupName, false, false, maxSize: sprite.MaxSize);
+                    if (drawable == null)
+                        break;
+
+                    return new UserConfiguredLayoutContainer
+                    {
+                        AutoSizeAxes = Axes.Both,
+                        Child = drawable
+                    };

                 case SkinComponentsContainerLookup containerLookup:

@iwa
Copy link

iwa commented Aug 16, 2024

just to add a bit on that, happens on all the layers, not only on HUD layer

@bdach
Copy link
Collaborator

bdach commented Aug 16, 2024

@frenzibyte @peppy FYI

@peppy peppy self-assigned this Aug 16, 2024
@peppy
Copy link
Member

peppy commented Aug 16, 2024

yeah, on my radar thanks.

@frenzibyte frenzibyte added the priority:0 Showstopper. Critical to the next release. label Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:skinning priority:0 Showstopper. Critical to the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants