AssetBundleCollector.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using System;
  2. using System.Collections.Generic;
  3. using UnityEditor;
  4. using UnityEngine;
  5. namespace GFGEditor
  6. {
  7. [CreateAssetMenu(menuName = "GFGAsset/AssetBundleCollector", fileName = "AssetBundleCollector")]
  8. public class AssetBundleCollector : ScriptableObject
  9. {
  10. public List<AssetBundleAssetList> assetBundleAssetLists = new List<AssetBundleAssetList>();
  11. public static AssetBundleCollector GetData()
  12. {
  13. string filePath = "Assets/GFGAsset/AssetBundleCollector.asset";
  14. var t = AssetDatabase.LoadAssetAtPath<AssetBundleCollector>(filePath);
  15. if (t == null)
  16. {
  17. t = new AssetBundleCollector();
  18. AssetDatabase.CreateAsset(t, filePath);
  19. }
  20. return t;
  21. }
  22. }
  23. [Serializable]
  24. public class AssetBundleAssetList
  25. {
  26. public string dir;
  27. public int status;
  28. public long bytes;
  29. public List<AssetBundleAssetListItem> list;
  30. }
  31. [Serializable]
  32. public class AssetBundleAssetListItem
  33. {
  34. public string key;
  35. public long bytes;
  36. public List<string> list;
  37. }
  38. }