Files
HX_MapEditor/Assets/Scripts/Utils/PathUtil.cs
2025-07-25 15:36:10 +08:00

35 lines
944 B
C#

using System.IO;
using UnityEngine;
public class PathUtil
{
//µØÐÎÌùͼ£¨¹Ò¼þ£©texture ·¾¶
public static string GetTexture(int mapId, string name, string suffix)
{
return $"{Application.dataPath}/GameAssets/Maps/{mapId}/Texture/{name}.{suffix}";
}
public static string GetMapTexure(int mapId, string name, string suffix)
{
return $"{Application.dataPath}/GameAssets/Maps/{mapId}/Texture/{name}.{suffix}";
}
public static string GetBigMapPath(int mapId)
{
return $"{Application.dataPath}/GameAssets/Maps/{mapId}";
}
#region XML
public static string GetXmlPath(int mapId, string fileName)
{
return $"{Application.dataPath}/GameAssets/Maps/{mapId}/XML/{fileName}.xml";
}
public static string GetObsPath(int mapId, string fileName)
{
return $"{Application.dataPath}/GameAssets/Maps/{mapId}/XML/{fileName}.bytes";
}
#endregion
}