public void Create(WindowBase window, Transform modulesRoot) { foreach (var element in this.elements) { element.Create(window, modulesRoot); if (window.GetActiveState() == ActiveState.Active) { element.DoWindowActive(); } } }