NLDClient-yudde/ProjectNLD/Assets/Code/Scripts/Gameplay/Utils/PathEx.cs

31 lines
984 B
C#
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using Framework;
namespace Gameplay.Utils
{
public static class PathEx
{
/// <summary>
/// 用于获取载具的原始模型路径,用于导出,该路径并不会被addressable打包
/// </summary>
/// <param name="prefabName"></param>
/// <returns></returns>
public static string GetVehicleSrcModelPath(string prefabName)
{
return $"Assets/Art/Character/Prefabs/Vehicle/{prefabName}.prefab";
}
/// <summary>
/// 获取载具游戏中使用的模型路径,用于addressable打包
/// </summary>
/// <param name="configId"></param>
/// <returns></returns>
public static string GetVehicleGameModelPath(int configId)
{
var savePath = string.Format(Constants.VEHICLE_OUTPUT_PATH, configId);
var prefabPath = $"{savePath}/vehicle_{configId}.prefab";
return prefabPath;
}
}
}