PathHelper.cs 866 B

1234567891011121314151617181920212223242526272829303132333435
  1. using UnityEngine;
  2. namespace ETModel
  3. {
  4. public static class PathHelper
  5. { /// <summary>
  6. ///应用程序外部资源路径存放路径(热更新资源路径)
  7. /// </summary>
  8. public static string AppHotfixResPath
  9. {
  10. get
  11. {
  12. string game = Application.productName;
  13. string path = AppResPath;
  14. if (Application.isMobilePlatform)
  15. {
  16. path = $"{Application.persistentDataPath}/{game}/";
  17. }
  18. return path;
  19. }
  20. }
  21. /// <summary>
  22. /// 应用程序内部资源路径存放路径
  23. /// </summary>
  24. public static string AppResPath
  25. {
  26. get
  27. {
  28. return Application.streamingAssetsPath;
  29. }
  30. }
  31. }
  32. }