Files
plugin-library/Assets/00.StaryEvoTools/Runtime/Tools/RemoteServices.cs
stary 60f1264d51
All checks were successful
Plugin Library CI / publish (00.BuildOriginality) (push) Successful in 4s
Plugin Library CI / publish (00.StaryEvo) (push) Successful in 4s
Plugin Library CI / publish (00.StaryEvoTools) (push) Successful in 10s
Plugin Library CI / publish (01.HybridCLR) (push) Successful in 5s
Plugin Library CI / publish (02.InformationSave) (push) Successful in 3s
Plugin Library CI / publish (03.YooAsset) (push) Successful in 32s
Plugin Library CI / publish (04.AudioCore) (push) Successful in 3s
Plugin Library CI / publish (05.TableTextConversion) (push) Successful in 4s
Plugin Library CI / publish (06.UIFarme) (push) Successful in 16s
Plugin Library CI / publish (07.RKTools) (push) Successful in 3s
Plugin Library CI / publish (08.UniTask) (push) Successful in 3s
Plugin Library CI / publish (09.CodeChecker) (push) Successful in 16s
Plugin Library CI / publish (10.StoryEditor) (push) Successful in 3s
Plugin Library CI / publish (10.XNode) (push) Successful in 3s
Plugin Library CI / publish (11.PointCloudTools) (push) Successful in 3s
【m】增加web第一版暂存
2026-04-18 01:00:51 +08:00

36 lines
1.0 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using YooAsset;
namespace Stary.Evo
{
public class RemoteServices : IRemoteServices
{
private readonly string _mainHost;
private readonly string _fallbackHost;
public RemoteServices(string mainHost, string fallbackHost = null)
{
_mainHost = mainHost.TrimEnd('/');
_fallbackHost = string.IsNullOrEmpty(fallbackHost)
? _mainHost
: fallbackHost.TrimEnd('/');
}
/// <summary>
/// 主下载地址YooAsset 会优先使用)
/// fileName 示例DefaultPackage/StaticAssets/DefaultPackage.version
/// </summary>
public string GetRemoteMainURL(string fileName)
{
return $"{_mainHost}/{fileName}";
}
/// <summary>
/// 备用下载地址(主地址失败时自动重试)
/// </summary>
public string GetRemoteFallbackURL(string fileName)
{
return $"{_fallbackHost}/{fileName}";
}
}
}