CAssetsConfigInfo.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using UnityEngine;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. namespace Engine.CLoader
  5. {
  6. /// <summary>某个资源的配置数据</summary>
  7. public class CAssetsConfigInfo
  8. {
  9. /// <summary>资源名称</summary>
  10. public string assetsName = string.Empty;
  11. /// <summary>资源大小</summary>
  12. public int assetsSize = 0;
  13. /// <summary>资源版本号</summary>
  14. public string assetsVer = string.Empty;
  15. /// <summary>依赖资源的名字列表</summary>
  16. public List<string> assetsDepNameList = new List<string>();
  17. /// <summary>缓存等级</summary>
  18. public int assetsCatchLevel = 0;
  19. /// <summary>依赖的资源个数</summary>
  20. public int assetDepCount = 0;
  21. /// <summary>资源大小</summary>
  22. public long assetSize = 0;
  23. /// <summary>依赖资源的完整数据对象列表</summary>
  24. private List<CAssetsConfigInfo> assetsDepInfoList = new List<CAssetsConfigInfo>();
  25. /// <summary>依赖资源的完整数据对象列表 第一次获取时会根据名字查找依赖资源的配置数据</summary>
  26. public List<CAssetsConfigInfo> AssetsDepInfoList
  27. {
  28. get
  29. {
  30. if (assetsDepInfoList.Count==0)
  31. {
  32. for (int i = 0; i < assetsDepNameList.Count; i++)
  33. {
  34. assetsDepInfoList.Add(CLoaderConfig.GetInstance().GetAssetsConfig(assetsDepNameList[i]));
  35. }
  36. }
  37. return assetsDepInfoList;
  38. }
  39. }
  40. }
  41. }