void Update() { if (!HasFreeSpace) { return; } var unit = UnitState.TryGetNonWorkingUnit(); if (!unit) { return; } var unitData = unit.State.Data; var placeData = Setup.State.Data; unitData.WorkPlaceId = placeData.Id; placeData.Units.Add(unitData.Id); }