Unity 框架

AssetConfig.cs 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. namespace TFramework
  5. {
  6. public static class AssetConfig
  7. {
  8. /// <summary>
  9. /// 运行模式
  10. /// </summary>
  11. public static UpdateMode RuntimeMode;
  12. /// <summary>
  13. /// 所有AssetBundle资源包清单的名称
  14. /// </summary>
  15. public static string AssetBundleManifestName { get; set; }
  16. /// <summary>
  17. /// AssetBundle资源加载根路径
  18. /// </summary>
  19. public static string AssetBundleRootPath
  20. {
  21. get
  22. {
  23. if (RuntimeMode == UpdateMode.Loacl)
  24. return Application.streamingAssetsPath + "/";
  25. else if (RuntimeMode == UpdateMode.Bulid)
  26. return Application.persistentDataPath + "/";
  27. else
  28. return null;
  29. }
  30. }
  31. /// <summary>
  32. /// 资源服务器地址
  33. /// </summary>
  34. public static string ResUrl;
  35. }
  36. }