using System.Collections.Generic; using System.Linq; using UnityEngine; namespace DDD.Tycoons { public class ServingTableController : MonoBehaviour { [SerializeField] private Transform _servingTableRoot; [SerializeField] private List _servingTables; private void Awake() { _servingTables = _servingTableRoot.GetComponentsInChildren().ToList(); } public ServingTable FindEmptyServingTable() { return _servingTables.FirstOrDefault(element => element.CurrentCraftRecipeData == null); } } }