FGUIUtils.cs 787 B

123456789101112131415161718192021222324252627
  1. namespace XGame.Framework.FGUI
  2. {
  3. public static class FguiUtils
  4. {
  5. /// <summary>
  6. /// 包名转ui的描述文件名(Description file data)
  7. /// fgui的ui数据保存在pkgName_fui.bytes文件里
  8. /// </summary>
  9. /// <param name="pkgName"></param>
  10. /// <returns></returns>
  11. public static string ToDescFileName(string pkgName)
  12. {
  13. return $"{pkgName}_fui";
  14. }
  15. /// <summary>
  16. /// 包名+资源名转ui路径
  17. /// </summary>
  18. /// <param name="pkgName"></param>
  19. /// <param name="resName"></param>
  20. /// <returns></returns>
  21. public static string ToUrl(string pkgName, string resName)
  22. {
  23. return $"ui://{pkgName}/{resName}";
  24. }
  25. }
  26. }