diff --git a/Assets/YooAsset/Runtime/CacheSystem/EVerifyResult.cs b/Assets/YooAsset/Runtime/CacheSystem/EVerifyResult.cs
index 553e4ddc..c8636e35 100644
--- a/Assets/YooAsset/Runtime/CacheSystem/EVerifyResult.cs
+++ b/Assets/YooAsset/Runtime/CacheSystem/EVerifyResult.cs
@@ -1,54 +1,54 @@
namespace YooAsset
{
- ///
- /// 下载文件校验结果
- ///
- internal enum EVerifyResult
- {
- ///
- /// 验证异常
- ///
- Exception = -7,
+ ///
+ /// 下载文件校验结果
+ ///
+ internal enum EVerifyResult
+ {
+ ///
+ /// 验证异常
+ ///
+ Exception = -7,
- ///
- /// 未找到缓存信息
- ///
- CacheNotFound = -6,
+ ///
+ /// 未找到缓存信息
+ ///
+ CacheNotFound = -6,
- ///
- /// 信息文件不存在
- ///
- InfoFileNotExisted = -5,
+ ///
+ /// 信息文件不存在
+ ///
+ InfoFileNotExisted = -5,
- ///
- /// 数据文件不存在
- ///
- DataFileNotExisted = -4,
+ ///
+ /// 数据文件不存在
+ ///
+ DataFileNotExisted = -4,
- ///
- /// 文件内容不足(小于正常大小)
- ///
- FileNotComplete = -3,
-
- ///
- /// 文件内容溢出(超过正常大小)
- ///
- FileOverflow = -2,
-
- ///
- /// 文件内容不匹配
- ///
- FileCrcError = -1,
+ ///
+ /// 文件内容不足(小于正常大小)
+ ///
+ FileNotComplete = -3,
- ///
- /// 默认状态(校验未完成)
- ///
- None = 0,
+ ///
+ /// 文件内容溢出(超过正常大小)
+ ///
+ FileOverflow = -2,
- ///
- /// 验证成功
- ///
- Succeed = 1,
- }
+ ///
+ /// 文件内容不匹配
+ ///
+ FileCrcError = -1,
+
+ ///
+ /// 默认状态(校验未完成)
+ ///
+ None = 0,
+
+ ///
+ /// 验证成功
+ ///
+ Succeed = 1,
+ }
}
\ No newline at end of file
diff --git a/Assets/YooAsset/Runtime/CacheSystem/Operation/Internal/VerifyCacheFilesOperation.cs b/Assets/YooAsset/Runtime/CacheSystem/Operation/Internal/VerifyCacheFilesOperation.cs
index 45f6d7e2..ef46764f 100644
--- a/Assets/YooAsset/Runtime/CacheSystem/Operation/Internal/VerifyCacheFilesOperation.cs
+++ b/Assets/YooAsset/Runtime/CacheSystem/Operation/Internal/VerifyCacheFilesOperation.cs
@@ -11,7 +11,7 @@ namespace YooAsset
public static VerifyCacheFilesOperation CreateOperation(CacheManager cache, List elements)
{
#if UNITY_WEBGL
- var operation = new VerifyCacheFilesWithoutThreadOperation(cache, elements);
+ var operation = new VerifyCacheFilesWithoutThreadOperation(cache, elements);
#else
var operation = new VerifyCacheFilesWithThreadOperation(cache, elements);
#endif
diff --git a/Assets/YooAsset/Runtime/CacheSystem/Operation/Internal/VerifyTempFileOperation.cs b/Assets/YooAsset/Runtime/CacheSystem/Operation/Internal/VerifyTempFileOperation.cs
index 0b96ff63..89ee8df9 100644
--- a/Assets/YooAsset/Runtime/CacheSystem/Operation/Internal/VerifyTempFileOperation.cs
+++ b/Assets/YooAsset/Runtime/CacheSystem/Operation/Internal/VerifyTempFileOperation.cs
@@ -13,7 +13,7 @@ namespace YooAsset
public static VerifyTempFileOperation CreateOperation(VerifyTempFileElement element)
{
#if UNITY_WEBGL
- var operation = new VerifyTempFileWithoutThreadOperation(element);
+ var operation = new VerifyTempFileWithoutThreadOperation(element);
#else
var operation = new VerifyTempFileWithThreadOperation(element);
#endif
diff --git a/Assets/YooAsset/Runtime/CacheSystem/PersistentHelper.cs b/Assets/YooAsset/Runtime/CacheSystem/PersistentHelper.cs
index ccd1b7a2..03ad5549 100644
--- a/Assets/YooAsset/Runtime/CacheSystem/PersistentHelper.cs
+++ b/Assets/YooAsset/Runtime/CacheSystem/PersistentHelper.cs
@@ -11,17 +11,17 @@ namespace YooAsset
#if UNITY_EDITOR
return StringUtility.Format("file:///{0}", path);
#elif UNITY_WEBGL
- return path;
+ return path;
#elif UNITY_IPHONE
- return StringUtility.Format("file://{0}", path);
+ return StringUtility.Format("file://{0}", path);
#elif UNITY_ANDROID
- return path;
+ return path;
#elif UNITY_STANDALONE_OSX
- return new System.Uri(path).ToString();
+ return new System.Uri(path).ToString();
#elif UNITY_STANDALONE
- return StringUtility.Format("file:///{0}", path);
+ return StringUtility.Format("file:///{0}", path);
#else
- return path;
+ return path;
#endif
}
}
diff --git a/Assets/YooAsset/Runtime/CacheSystem/PersistentManager.cs b/Assets/YooAsset/Runtime/CacheSystem/PersistentManager.cs
index 1f163e24..3b93500a 100644
--- a/Assets/YooAsset/Runtime/CacheSystem/PersistentManager.cs
+++ b/Assets/YooAsset/Runtime/CacheSystem/PersistentManager.cs
@@ -68,9 +68,9 @@ namespace YooAsset
projectPath = PathUtility.RegularPath(projectPath);
return PathUtility.Combine(projectPath, YooAssetSettingsData.Setting.DefaultYooFolderName);
#elif UNITY_STANDALONE
- return PathUtility.Combine(UnityEngine.Application.dataPath, YooAssetSettingsData.Setting.DefaultYooFolderName);
+ return PathUtility.Combine(UnityEngine.Application.dataPath, YooAssetSettingsData.Setting.DefaultYooFolderName);
#else
- return PathUtility.Combine(UnityEngine.Application.persistentDataPath, YooAssetSettingsData.Setting.DefaultYooFolderName);
+ return PathUtility.Combine(UnityEngine.Application.persistentDataPath, YooAssetSettingsData.Setting.DefaultYooFolderName);
#endif
}
diff --git a/Assets/YooAsset/Runtime/DiagnosticSystem/RemoteDebuggerInRuntime.cs b/Assets/YooAsset/Runtime/DiagnosticSystem/RemoteDebuggerInRuntime.cs
index b61295de..465f9443 100644
--- a/Assets/YooAsset/Runtime/DiagnosticSystem/RemoteDebuggerInRuntime.cs
+++ b/Assets/YooAsset/Runtime/DiagnosticSystem/RemoteDebuggerInRuntime.cs
@@ -25,29 +25,29 @@ namespace YooAsset
}
}
#else
- private void OnEnable()
- {
- PlayerConnection.instance.Register(RemoteDebuggerDefine.kMsgSendEditorToPlayer, OnHandleEditorMessage);
- }
- private void OnDisable()
- {
- PlayerConnection.instance.Unregister(RemoteDebuggerDefine.kMsgSendEditorToPlayer, OnHandleEditorMessage);
- }
- private void OnHandleEditorMessage(MessageEventArgs args)
- {
- var command = RemoteCommand.Deserialize(args.data);
- YooLogger.Log($"On handle remote command : {command.CommandType} Param : {command.CommandParam}");
- if (command.CommandType == (int)ERemoteCommand.SampleOnce)
- {
- var debugReport = YooAssets.GetDebugReport();
- var data = DebugReport.Serialize(debugReport);
- PlayerConnection.instance.Send(RemoteDebuggerDefine.kMsgSendPlayerToEditor, data);
- }
- else
- {
- throw new NotImplementedException(command.CommandType.ToString());
- }
- }
+ private void OnEnable()
+ {
+ PlayerConnection.instance.Register(RemoteDebuggerDefine.kMsgSendEditorToPlayer, OnHandleEditorMessage);
+ }
+ private void OnDisable()
+ {
+ PlayerConnection.instance.Unregister(RemoteDebuggerDefine.kMsgSendEditorToPlayer, OnHandleEditorMessage);
+ }
+ private void OnHandleEditorMessage(MessageEventArgs args)
+ {
+ var command = RemoteCommand.Deserialize(args.data);
+ YooLogger.Log($"On handle remote command : {command.CommandType} Param : {command.CommandParam}");
+ if (command.CommandType == (int)ERemoteCommand.SampleOnce)
+ {
+ var debugReport = YooAssets.GetDebugReport();
+ var data = DebugReport.Serialize(debugReport);
+ PlayerConnection.instance.Send(RemoteDebuggerDefine.kMsgSendPlayerToEditor, data);
+ }
+ else
+ {
+ throw new NotImplementedException(command.CommandType.ToString());
+ }
+ }
#endif
}
}
\ No newline at end of file
diff --git a/Assets/YooAsset/Runtime/DownloadSystem/DownloadManager.cs b/Assets/YooAsset/Runtime/DownloadSystem/DownloadManager.cs
index 71a693cf..84993376 100644
--- a/Assets/YooAsset/Runtime/DownloadSystem/DownloadManager.cs
+++ b/Assets/YooAsset/Runtime/DownloadSystem/DownloadManager.cs
@@ -100,17 +100,17 @@ namespace YooAsset
DownloaderBase newDownloader = null;
YooLogger.Log($"Beginning to download bundle : {bundleInfo.Bundle.BundleName} URL : {bundleInfo.RemoteMainURL}");
#if UNITY_WEBGL
- if (bundleInfo.Bundle.Buildpipeline == EDefaultBuildPipeline.RawFileBuildPipeline.ToString())
- {
- FileUtility.CreateFileDirectory(bundleInfo.CachedDataFilePath);
- System.Type requesterType = typeof(FileGeneralRequest);
- newDownloader = new FileDownloader(bundleInfo, requesterType, failedTryAgain, timeout);
- }
- else
- {
- System.Type requesterType = typeof(AssetBundleWebRequest);
- newDownloader = new WebDownloader(bundleInfo, requesterType, failedTryAgain, timeout);
- }
+ if (bundleInfo.Bundle.Buildpipeline == EDefaultBuildPipeline.RawFileBuildPipeline.ToString())
+ {
+ FileUtility.CreateFileDirectory(bundleInfo.CachedDataFilePath);
+ System.Type requesterType = typeof(FileGeneralRequest);
+ newDownloader = new FileDownloader(bundleInfo, requesterType, failedTryAgain, timeout);
+ }
+ else
+ {
+ System.Type requesterType = typeof(AssetBundleWebRequest);
+ newDownloader = new WebDownloader(bundleInfo, requesterType, failedTryAgain, timeout);
+ }
#else
FileUtility.CreateFileDirectory(bundleInfo.CachedDataFilePath);
bool resumeDownload = bundleInfo.Bundle.FileSize >= _breakpointResumeFileSize;
diff --git a/Assets/YooAsset/Runtime/DownloadSystem/Requester/AssetBundleWebRequest.cs b/Assets/YooAsset/Runtime/DownloadSystem/Requester/AssetBundleWebRequest.cs
index 797b8c79..20b4ab3f 100644
--- a/Assets/YooAsset/Runtime/DownloadSystem/Requester/AssetBundleWebRequest.cs
+++ b/Assets/YooAsset/Runtime/DownloadSystem/Requester/AssetBundleWebRequest.cs
@@ -75,16 +75,16 @@ namespace YooAsset
Status = ERequestStatus.Success;
}
#else
- RequestHttpCode = _webRequest.responseCode;
- if (_webRequest.isNetworkError || _webRequest.isHttpError)
- {
- RequestNetError = _webRequest.error;
- Status = ERequestStatus.Error;
- }
- else
- {
- Status = ERequestStatus.Success;
- }
+ RequestHttpCode = _webRequest.responseCode;
+ if (_webRequest.isNetworkError || _webRequest.isHttpError)
+ {
+ RequestNetError = _webRequest.error;
+ Status = ERequestStatus.Error;
+ }
+ else
+ {
+ Status = ERequestStatus.Success;
+ }
#endif
// 缓存加载的AssetBundle对象
diff --git a/Assets/YooAsset/Runtime/DownloadSystem/Requester/FileGeneralRequest.cs b/Assets/YooAsset/Runtime/DownloadSystem/Requester/FileGeneralRequest.cs
index 4d90ba33..d9a26981 100644
--- a/Assets/YooAsset/Runtime/DownloadSystem/Requester/FileGeneralRequest.cs
+++ b/Assets/YooAsset/Runtime/DownloadSystem/Requester/FileGeneralRequest.cs
@@ -59,16 +59,16 @@ namespace YooAsset
Status = ERequestStatus.Success;
}
#else
- RequestHttpCode = _webRequest.responseCode;
- if (_webRequest.isNetworkError || _webRequest.isHttpError)
- {
- RequestNetError = _webRequest.error;
- Status = ERequestStatus.Error;
- }
- else
- {
- Status = ERequestStatus.Success;
- }
+ RequestHttpCode = _webRequest.responseCode;
+ if (_webRequest.isNetworkError || _webRequest.isHttpError)
+ {
+ RequestNetError = _webRequest.error;
+ Status = ERequestStatus.Error;
+ }
+ else
+ {
+ Status = ERequestStatus.Success;
+ }
#endif
// 最终释放下载器
diff --git a/Assets/YooAsset/Runtime/DownloadSystem/Requester/FileResumeRequest.cs b/Assets/YooAsset/Runtime/DownloadSystem/Requester/FileResumeRequest.cs
index ff304d11..103066fc 100644
--- a/Assets/YooAsset/Runtime/DownloadSystem/Requester/FileResumeRequest.cs
+++ b/Assets/YooAsset/Runtime/DownloadSystem/Requester/FileResumeRequest.cs
@@ -48,8 +48,8 @@ namespace YooAsset
var handler = new DownloadHandlerFile(_tempFilePath, true);
handler.removeFileOnAbort = false;
#else
- var handler = new DownloadHandlerFileRange(tempFilePath, _bundleInfo.Bundle.FileSize, _webRequest);
- _downloadHandle = handler;
+ var handler = new DownloadHandlerFileRange(tempFilePath, _bundleInfo.Bundle.FileSize, _webRequest);
+ _downloadHandle = handler;
#endif
_webRequest.downloadHandler = handler;
_webRequest.disposeDownloadHandlerOnDispose = true;
@@ -83,16 +83,16 @@ namespace YooAsset
Status = ERequestStatus.Success;
}
#else
- RequestHttpCode = _webRequest.responseCode;
- if (_webRequest.isNetworkError || _webRequest.isHttpError)
- {
- RequestNetError = _webRequest.error;
- Status = ERequestStatus.Error;
- }
- else
- {
- Status = ERequestStatus.Success;
- }
+ RequestHttpCode = _webRequest.responseCode;
+ if (_webRequest.isNetworkError || _webRequest.isHttpError)
+ {
+ RequestNetError = _webRequest.error;
+ Status = ERequestStatus.Error;
+ }
+ else
+ {
+ Status = ERequestStatus.Success;
+ }
#endif
// 注意:下载断点续传文件发生特殊错误码之后删除文件
diff --git a/Assets/YooAsset/Runtime/DownloadSystem/UnityWebRequesterBase.cs b/Assets/YooAsset/Runtime/DownloadSystem/UnityWebRequesterBase.cs
index 620230ff..0fb6d6ce 100644
--- a/Assets/YooAsset/Runtime/DownloadSystem/UnityWebRequesterBase.cs
+++ b/Assets/YooAsset/Runtime/DownloadSystem/UnityWebRequesterBase.cs
@@ -71,10 +71,10 @@ namespace YooAsset
#if UNITY_2020_3_OR_NEWER
return _webRequest.result != UnityWebRequest.Result.Success;
#else
- if (_webRequest.isNetworkError || _webRequest.isHttpError)
- return true;
- else
- return false;
+ if (_webRequest.isNetworkError || _webRequest.isHttpError)
+ return true;
+ else
+ return false;
#endif
}
diff --git a/Assets/YooAsset/Runtime/ResourceManager/Loader/AssetBundleFileLoader.cs b/Assets/YooAsset/Runtime/ResourceManager/Loader/AssetBundleFileLoader.cs
index 3bfc1f28..5feca6ce 100644
--- a/Assets/YooAsset/Runtime/ResourceManager/Loader/AssetBundleFileLoader.cs
+++ b/Assets/YooAsset/Runtime/ResourceManager/Loader/AssetBundleFileLoader.cs
@@ -63,8 +63,8 @@ namespace YooAsset
FileLoadPath = MainBundleInfo.BuildinFilePath;
}
#else
- _steps = ESteps.LoadBundleFile;
- FileLoadPath = MainBundleInfo.BuildinFilePath;
+ _steps = ESteps.LoadBundleFile;
+ FileLoadPath = MainBundleInfo.BuildinFilePath;
#endif
}
else if (MainBundleInfo.LoadMode == BundleInfo.ELoadMode.LoadFromCache)
diff --git a/Assets/YooAsset/Runtime/ResourceManager/Loader/RawBundleFileLoader.cs b/Assets/YooAsset/Runtime/ResourceManager/Loader/RawBundleFileLoader.cs
index 61c496a8..f1163ee7 100644
--- a/Assets/YooAsset/Runtime/ResourceManager/Loader/RawBundleFileLoader.cs
+++ b/Assets/YooAsset/Runtime/ResourceManager/Loader/RawBundleFileLoader.cs
@@ -45,8 +45,8 @@ namespace YooAsset
_steps = ESteps.Unpack;
FileLoadPath = MainBundleInfo.CachedDataFilePath;
#else
- _steps = ESteps.CheckFile;
- FileLoadPath = MainBundleInfo.BuildinFilePath;
+ _steps = ESteps.CheckFile;
+ FileLoadPath = MainBundleInfo.BuildinFilePath;
#endif
}
else if (MainBundleInfo.LoadMode == BundleInfo.ELoadMode.LoadFromCache)
diff --git a/Assets/YooAsset/Runtime/ResourceManager/ResourceManager.cs b/Assets/YooAsset/Runtime/ResourceManager/ResourceManager.cs
index 90eb6191..dfb2745f 100644
--- a/Assets/YooAsset/Runtime/ResourceManager/ResourceManager.cs
+++ b/Assets/YooAsset/Runtime/ResourceManager/ResourceManager.cs
@@ -131,7 +131,7 @@ namespace YooAsset
public void ForceUnloadAllAssets()
{
#if UNITY_WEBGL
- throw new Exception($"WebGL not support invoke {nameof(ForceUnloadAllAssets)}");
+ throw new Exception($"WebGL not support invoke {nameof(ForceUnloadAllAssets)}");
#else
// 注意:因为场景无法异步转同步,需要等待所有场景加载完毕!
foreach (var sceneHandlePair in _sceneHandles)
@@ -429,10 +429,10 @@ namespace YooAsset
else
{
#if UNITY_WEBGL
- if (bundleInfo.Bundle.Buildpipeline== EDefaultBuildPipeline.RawFileBuildPipeline.ToString())
- loader = new RawBundleWebLoader(this, bundleInfo);
- else
- loader = new AssetBundleWebLoader(this, bundleInfo);
+ if (bundleInfo.Bundle.Buildpipeline== EDefaultBuildPipeline.RawFileBuildPipeline.ToString())
+ loader = new RawBundleWebLoader(this, bundleInfo);
+ else
+ loader = new AssetBundleWebLoader(this, bundleInfo);
#else
if (bundleInfo.Bundle.Buildpipeline == EDefaultBuildPipeline.RawFileBuildPipeline.ToString())
loader = new RawBundleFileLoader(this, bundleInfo);
diff --git a/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/EditorSimulateModeHelper.cs b/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/EditorSimulateModeHelper.cs
index bff9625f..c280bb50 100644
--- a/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/EditorSimulateModeHelper.cs
+++ b/Assets/YooAsset/Runtime/ResourcePackage/PlayMode/EditorSimulateModeHelper.cs
@@ -42,12 +42,12 @@ namespace YooAsset
#else
namespace YooAsset
{
- public static class EditorSimulateModeHelper
- {
- ///
- /// 编辑器下模拟构建清单
- ///
- public static string SimulateBuild(string buildPipelineName, string packageName) { throw new System.Exception("Only support in unity editor !"); }
- }
+ public static class EditorSimulateModeHelper
+ {
+ ///
+ /// 编辑器下模拟构建清单
+ ///
+ public static string SimulateBuild(string buildPipelineName, string packageName) { throw new System.Exception("Only support in unity editor !"); }
+ }
}
#endif
\ No newline at end of file
diff --git a/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs b/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs
index fdb21734..d3b9394a 100644
--- a/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs
+++ b/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs
@@ -214,8 +214,8 @@ namespace YooAsset
throw new Exception($"{nameof(ResourcePackage)} create parameters is null.");
#if !UNITY_EDITOR
- if (parameters is EditorSimulateModeParameters)
- throw new Exception($"Editor simulate mode only support unity editor.");
+ if (parameters is EditorSimulateModeParameters)
+ throw new Exception($"Editor simulate mode only support unity editor.");
#endif
if (parameters is EditorSimulateModeParameters)
@@ -255,10 +255,10 @@ namespace YooAsset
if (_playMode != EPlayMode.EditorSimulateMode)
{
#if UNITY_WEBGL
- if (_playMode != EPlayMode.WebPlayMode)
- {
- throw new Exception($"{_playMode} can not support WebGL plateform ! Please use {nameof(EPlayMode.WebPlayMode)}");
- }
+ if (_playMode != EPlayMode.WebPlayMode)
+ {
+ throw new Exception($"{_playMode} can not support WebGL plateform ! Please use {nameof(EPlayMode.WebPlayMode)}");
+ }
#else
if (_playMode == EPlayMode.WebPlayMode)
{