mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
更新YooAsset 2.3.3 -> 2.3.7 优化YooAsset.RuntimeExtension以及YooAsset.EditorExtension目录结构
更新YooAsset 2.3.3 -> 2.3.7 优化YooAsset.RuntimeExtension以及YooAsset.EditorExtension目录结构
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
internal class DownloadParam
|
||||
{
|
||||
public readonly int FailedTryAgain;
|
||||
public readonly int Timeout;
|
||||
|
||||
/// <summary>
|
||||
/// 导入的本地文件路径
|
||||
/// </summary>
|
||||
public string ImportFilePath { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// 主资源地址
|
||||
/// </summary>
|
||||
public string MainURL { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// 备用资源地址
|
||||
/// </summary>
|
||||
public string FallbackURL { set; get; }
|
||||
|
||||
public DownloadParam(int failedTryAgain, int timeout)
|
||||
{
|
||||
FailedTryAgain = failedTryAgain;
|
||||
Timeout = timeout;
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 56ea224b45d314e4a86b558404e9b6c8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -1,4 +1,5 @@
|
||||
using UnityEngine.Networking;
|
||||
using UnityEngine;
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
@@ -9,6 +10,14 @@ namespace YooAsset
|
||||
|
||||
internal class DownloadSystemHelper
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
|
||||
private static void OnRuntimeInitialize()
|
||||
{
|
||||
UnityWebRequestCreater = null;
|
||||
}
|
||||
#endif
|
||||
|
||||
public static UnityWebRequestDelegate UnityWebRequestCreater = null;
|
||||
public static UnityWebRequest NewUnityWebRequestGet(string requestURL)
|
||||
{
|
||||
@@ -28,7 +37,9 @@ namespace YooAsset
|
||||
string url;
|
||||
|
||||
// 获取对应平台的URL地址
|
||||
#if UNITY_EDITOR
|
||||
#if UNITY_EDITOR_OSX
|
||||
url = StringUtility.Format("file://{0}", path);
|
||||
#elif UNITY_EDITOR
|
||||
url = StringUtility.Format("file:///{0}", path);
|
||||
#elif UNITY_WEBGL
|
||||
url = path;
|
||||
@@ -56,7 +67,7 @@ namespace YooAsset
|
||||
}
|
||||
#elif UNITY_STANDALONE_OSX
|
||||
url = new System.Uri(path).ToString();
|
||||
#elif UNITY_STANDALONE
|
||||
#elif UNITY_STANDALONE || UNITY_WSA
|
||||
url = StringUtility.Format("file:///{0}", path);
|
||||
#else
|
||||
throw new System.NotImplementedException();
|
||||
|
@@ -6,6 +6,14 @@ namespace YooAsset
|
||||
{
|
||||
internal class WebRequestCounter
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
[UnityEngine.RuntimeInitializeOnLoadMethod(UnityEngine.RuntimeInitializeLoadType.SubsystemRegistration)]
|
||||
private static void OnRuntimeInitialize()
|
||||
{
|
||||
_requestFailedRecorder.Clear();
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// 记录网络请求失败事件的次数
|
||||
/// </summary>
|
||||
|
Reference in New Issue
Block a user