// File: CookwareDataAsset.cs using System.Collections.Generic; using System.Linq; using UnityEngine; namespace DDD { [CreateAssetMenu(fileName = "CookwareDataAsset", menuName = "GoogleSheet/CookwareDataAsset")] public class CookwareDataAsset : DataAsset { public bool TryGetValueByCookwareType(CookwareType cookwareType, out CookwareDataEntry cookwareDataEntry) { if (_datas == null) { cookwareDataEntry = null; return false; } cookwareDataEntry = _datas.FirstOrDefault(data => data != null && data.CookwareType == cookwareType); return cookwareDataEntry != null; } } }