1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-05 04:33:39 +08:00

Manually set clock for storyboard if loading before being given a parent

This commit is contained in:
David Zhao
2019-07-08 18:46:12 +09:00
Unverified
parent ffc3c9f8f6
commit 0cf4bf2352
+6 -1
View File
@@ -362,7 +362,12 @@ namespace osu.Game.Screens.Play
storyboard.Masking = true;
if (asyncLoad)
LoadComponentAsync(storyboard, StoryboardContainer.Add);
LoadComponentAsync(storyboard, c =>
{
// Since the storyboard was loaded before it can be added to the draw hierarchy, manually set the clock for it here.
c.Clock = GameplayClockContainer.GameplayClock;
StoryboardContainer.Add(c);
});
else
StoryboardContainer.Add(storyboard);
}