ExcelDataBase.cs 481 B

12345678910111213141516171819202122232425
  1. 
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using UnityEngine;
  5. using System.Linq;
  6. public class ExcelDataBase<T> : ScriptableObject where T : ExcelItemBase
  7. {
  8. public T[] items;
  9. public T GetExcelItem(string targetId)
  10. {
  11. //if (items != null && items.Length > 0)
  12. //{
  13. // return items.FirstOrDefault(item => item.id == targetId);
  14. //}
  15. return null;
  16. }
  17. }
  18. public class ExcelItemBase
  19. {
  20. //public string id;
  21. }