【m】增加web第一版暂存
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
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
This commit is contained in:
36
Assets/00.StaryEvoTools/Runtime/Tools/RemoteServices.cs
Normal file
36
Assets/00.StaryEvoTools/Runtime/Tools/RemoteServices.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
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}";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user