1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-30 08:52:58 +08:00

Check for new components every one second to handle late loaders

This commit is contained in:
Dean Herbert 2021-04-28 18:59:55 +09:00
parent fd587a82ff
commit 4f9e1e4945

View File

@ -23,9 +23,14 @@ namespace osu.Game.Skinning.Editor
{ {
base.LoadComplete(); base.LoadComplete();
ISkinnableComponent[] components = target.ChildrenOfType<ISkinnableComponent>().ToArray(); checkForComponents();
}
foreach (var c in components) AddBlueprintFor(c); private void checkForComponents()
{
foreach (var c in target.ChildrenOfType<ISkinnableComponent>().ToArray()) AddBlueprintFor(c);
Scheduler.AddDelayed(checkForComponents, 1000);
} }
protected override SelectionHandler<ISkinnableComponent> CreateSelectionHandler() => new SkinSelectionHandler(); protected override SelectionHandler<ISkinnableComponent> CreateSelectionHandler() => new SkinSelectionHandler();