From 0cf4bf2352048fd6feca7495a69b6d9e09b992f9 Mon Sep 17 00:00:00 2001 From: David Zhao Date: Mon, 8 Jul 2019 18:46:12 +0900 Subject: [PATCH] Manually set clock for storyboard if loading before being given a parent --- osu.Game/Screens/Play/Player.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 0da9c77f25..ea614e7658 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -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); }