Add comment about why we are running `checkForComponents` on a timer

This commit is contained in:
Dean Herbert 2021-05-03 15:20:00 +09:00
parent a298a93070
commit 7d8be8cd83
1 changed files with 2 additions and 0 deletions

View File

@ -30,6 +30,8 @@ private void checkForComponents()
{ {
foreach (var c in target.ChildrenOfType<ISkinnableComponent>().ToArray()) AddBlueprintFor(c); foreach (var c in target.ChildrenOfType<ISkinnableComponent>().ToArray()) AddBlueprintFor(c);
// We'd hope to eventually be running this in a more sensible way, but this handles situations where new drawables become present (ie. during ongoing gameplay)
// or when drawables in the target are loaded asynchronously and may not be immediately available when this BlueprintContainer is loaded.
Scheduler.AddDelayed(checkForComponents, 1000); Scheduler.AddDelayed(checkForComponents, 1000);
} }