1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 15:03:13 +08:00

Add fallback logic in case a ruleset consumer forgets to add the HitObjectContainer

This commit is contained in:
Dean Herbert 2018-10-12 19:15:11 +09:00
parent ff559a3a1b
commit ad42f2244d

View File

@ -93,6 +93,15 @@ namespace osu.Game.Rulesets.UI
nestedPlayfields.Value.Add(otherPlayfield);
}
protected override void LoadComplete()
{
base.LoadComplete();
// in the case a consumer forgets to add the HitObjectContainer, we will add it here.
if (HitObjectContainer.Parent == null)
AddInternal(HitObjectContainer);
}
protected override void Update()
{
base.Update();