【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:
@@ -4,9 +4,7 @@ using System.Threading.Tasks;
|
||||
using DG.Tweening;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
#if HotUpdate
|
||||
using YooAsset;
|
||||
#endif
|
||||
|
||||
namespace Stary.Evo.UIFarme
|
||||
{
|
||||
@@ -201,7 +199,6 @@ namespace Stary.Evo.UIFarme
|
||||
{
|
||||
return activePanel.gameObject;
|
||||
}
|
||||
#if HotUpdate
|
||||
AssetHandle handle = null;
|
||||
if (packageName == null)
|
||||
{
|
||||
@@ -223,10 +220,6 @@ namespace Stary.Evo.UIFarme
|
||||
await handle.Task;
|
||||
|
||||
activePanel = GameObject.Instantiate(handle.AssetObject as GameObject, panelParent);
|
||||
#else
|
||||
GameObject handle = Resources.Load<GameObject>(panelName);
|
||||
activePanel = GameObject.Instantiate(handle, panelParent);
|
||||
#endif
|
||||
|
||||
|
||||
activePanel.name = this.GetType().Name;
|
||||
|
||||
@@ -4,9 +4,7 @@ using System.Threading.Tasks;
|
||||
using DG.Tweening;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
#if HotUpdate
|
||||
using YooAsset;
|
||||
#endif
|
||||
|
||||
namespace Stary.Evo.UIFarme
|
||||
{
|
||||
@@ -163,7 +161,6 @@ namespace Stary.Evo.UIFarme
|
||||
{
|
||||
return activePanel.gameObject;
|
||||
}
|
||||
#if HotUpdate
|
||||
AssetHandle handle = null;
|
||||
if (packageName == null)
|
||||
{
|
||||
@@ -185,10 +182,6 @@ namespace Stary.Evo.UIFarme
|
||||
await handle.Task;
|
||||
|
||||
activePanel = GameObject.Instantiate(handle.AssetObject as GameObject, panelParent);
|
||||
#else
|
||||
GameObject handle = Resources.Load<GameObject>(panelName);
|
||||
activePanel = GameObject.Instantiate(handle, panelParent);
|
||||
#endif
|
||||
|
||||
activePanel.name = panelName;
|
||||
|
||||
|
||||
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}";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1bfb1ccd41e3422e9b42f65c275eb0ea
|
||||
timeCreated: 1776440659
|
||||
@@ -26,6 +26,17 @@ namespace Stary.Evo
|
||||
initParameters.BuildinFileSystemParameters = buildinFileSystemParams;
|
||||
return initParameters;
|
||||
}
|
||||
public static InitializeParameters WebInitializeParameter(string packageName, string defaultHostServer, string fallbackHostServer)
|
||||
{
|
||||
IRemoteServices remoteServices = new RemoteServices(defaultHostServer, fallbackHostServer);
|
||||
var webServerFileSystemParams = FileSystemParameters.CreateDefaultWebServerFileSystemParameters();
|
||||
var webRemoteFileSystemParams = FileSystemParameters.CreateDefaultWebRemoteFileSystemParameters(remoteServices); //支持跨域下载
|
||||
|
||||
var initParameters = new WebPlayModeParameters();
|
||||
initParameters.WebServerFileSystemParameters = webServerFileSystemParams;
|
||||
initParameters.WebRemoteFileSystemParameters = webRemoteFileSystemParams;
|
||||
return initParameters;
|
||||
}
|
||||
public static InitializeParameters EditorSimulateInitializeParameter(string packageName)
|
||||
{
|
||||
var buildResult = EditorSimulateModeHelper.SimulateBuild(packageName);
|
||||
|
||||
Reference in New Issue
Block a user