using System.Linq; using Godot; [SceneTree] public partial class DaySchedule : PanelContainer { [Export] private Company _company; [Export] private int _hoursInDay = 6; public override void _Ready() { TimeSlotContainer.GetChildren().ToList().ForEach(child => child.QueueFree()); for (var i = 0; i < _hoursInDay; i++) { var timeSlot = Instantiator.Instantiate(); TimeSlotContainer.AddChild(timeSlot); } } }