diff --git a/Assets/YooAsset/Runtime/AssetSystem/Handles/AssetOperationHandle.cs b/Assets/YooAsset/Runtime/AssetSystem/Handles/AssetOperationHandle.cs
index b5f9dc5..20cf027 100644
--- a/Assets/YooAsset/Runtime/AssetSystem/Handles/AssetOperationHandle.cs
+++ b/Assets/YooAsset/Runtime/AssetSystem/Handles/AssetOperationHandle.cs
@@ -149,7 +149,7 @@ namespace YooAsset
private InstantiateOperation InstantiateAsyncInternal(Vector3 position, Quaternion rotation, Transform parent, bool setPositionRotation)
{
InstantiateOperation operation = new InstantiateOperation(this, position, rotation, parent, setPositionRotation);
- OperationSystem.StartOperaiton(operation);
+ OperationSystem.StartOperation(operation);
return operation;
}
}
diff --git a/Assets/YooAsset/Runtime/AssetSystem/Handles/SceneOperationHandle.cs b/Assets/YooAsset/Runtime/AssetSystem/Handles/SceneOperationHandle.cs
index 53d5eca..71fae54 100644
--- a/Assets/YooAsset/Runtime/AssetSystem/Handles/SceneOperationHandle.cs
+++ b/Assets/YooAsset/Runtime/AssetSystem/Handles/SceneOperationHandle.cs
@@ -102,7 +102,7 @@ namespace YooAsset
{
string error = $"{nameof(SceneOperationHandle)} is invalid.";
var operation = new UnloadSceneOperation(error);
- OperationSystem.StartOperaiton(operation);
+ OperationSystem.StartOperation(operation);
return operation;
}
@@ -112,7 +112,7 @@ namespace YooAsset
string error = $"Cannot unload main scene. Use {nameof(YooAssets.LoadSceneAsync)} method to change the main scene !";
YooLogger.Error(error);
var operation = new UnloadSceneOperation(error);
- OperationSystem.StartOperaiton(operation);
+ OperationSystem.StartOperation(operation);
return operation;
}
@@ -121,7 +121,7 @@ namespace YooAsset
AssetSystem.UnloadSubScene(Provider);
{
var operation = new UnloadSceneOperation(sceneObject);
- OperationSystem.StartOperaiton(operation);
+ OperationSystem.StartOperation(operation);
return operation;
}
}
diff --git a/Assets/YooAsset/Runtime/DownloadSystem/PatchCacheVerifier.cs b/Assets/YooAsset/Runtime/DownloadSystem/PatchCacheVerifier.cs
index 5144acd..2a50218 100644
--- a/Assets/YooAsset/Runtime/DownloadSystem/PatchCacheVerifier.cs
+++ b/Assets/YooAsset/Runtime/DownloadSystem/PatchCacheVerifier.cs
@@ -55,7 +55,7 @@ namespace YooAsset
// 注意:如果是APP资源并且哈希值相同,则不需要下载
if (appPatchManifest.TryGetPatchBundle(patchBundle.BundleName, out PatchBundle appPatchBundle))
{
- if (appPatchBundle.IsBuildin && appPatchBundle.FileHash == patchBundle.FileHash)
+ if (appPatchBundle.IsBuildin && appPatchBundle.Equals(patchBundle))
continue;
}
@@ -180,7 +180,7 @@ namespace YooAsset
// 注意:如果是APP资源并且哈希值相同,则不需要下载
if (appPatchManifest.TryGetPatchBundle(patchBundle.BundleName, out PatchBundle appPatchBundle))
{
- if (appPatchBundle.IsBuildin && appPatchBundle.FileHash == patchBundle.FileHash)
+ if (appPatchBundle.IsBuildin && appPatchBundle.Equals(patchBundle))
continue;
}
diff --git a/Assets/YooAsset/Runtime/OperationSystem/OperationSystem.cs b/Assets/YooAsset/Runtime/OperationSystem/OperationSystem.cs
index 6442e46..cf05a69 100644
--- a/Assets/YooAsset/Runtime/OperationSystem/OperationSystem.cs
+++ b/Assets/YooAsset/Runtime/OperationSystem/OperationSystem.cs
@@ -59,7 +59,7 @@ namespace YooAsset
///
/// 开始处理异步操作类
///
- public static void StartOperaiton(AsyncOperationBase operationBase)
+ public static void StartOperation(AsyncOperationBase operationBase)
{
_operations.Add(operationBase);
operationBase.Start();
diff --git a/Assets/YooAsset/Runtime/PatchSystem/Operations/DownloaderOperation.cs b/Assets/YooAsset/Runtime/PatchSystem/Operations/DownloaderOperation.cs
index 5b155c5..bbcd688 100644
--- a/Assets/YooAsset/Runtime/PatchSystem/Operations/DownloaderOperation.cs
+++ b/Assets/YooAsset/Runtime/PatchSystem/Operations/DownloaderOperation.cs
@@ -205,7 +205,7 @@ namespace YooAsset
{
if (_steps == ESteps.None)
{
- OperationSystem.StartOperaiton(this);
+ OperationSystem.StartOperation(this);
}
}
diff --git a/Assets/YooAsset/Runtime/PatchSystem/Operations/UpdatePackageOperation.cs b/Assets/YooAsset/Runtime/PatchSystem/Operations/UpdatePackageOperation.cs
index 827dff4..d3b3e25 100644
--- a/Assets/YooAsset/Runtime/PatchSystem/Operations/UpdatePackageOperation.cs
+++ b/Assets/YooAsset/Runtime/PatchSystem/Operations/UpdatePackageOperation.cs
@@ -205,7 +205,7 @@ namespace YooAsset
// 注意:如果是APP资源并且哈希值相同,则不需要下载
if (_impl.AppPatchManifest.TryGetPatchBundle(patchBundle.BundleName, out PatchBundle appPatchBundle))
{
- if (appPatchBundle.IsBuildin && appPatchBundle.FileHash == patchBundle.FileHash)
+ if (appPatchBundle.IsBuildin && appPatchBundle.Equals(patchBundle))
continue;
}
diff --git a/Assets/YooAsset/Runtime/PatchSystem/PatchBundle.cs b/Assets/YooAsset/Runtime/PatchSystem/PatchBundle.cs
index 0efbc15..8b00fd4 100644
--- a/Assets/YooAsset/Runtime/PatchSystem/PatchBundle.cs
+++ b/Assets/YooAsset/Runtime/PatchSystem/PatchBundle.cs
@@ -160,5 +160,16 @@ namespace YooAsset
else
return false;
}
+
+ ///
+ /// 检测资源包文件内容是否相同
+ ///
+ public bool Equals(PatchBundle otherBundle)
+ {
+ if (FileHash == otherBundle.FileHash)
+ return true;
+
+ return false;
+ }
}
}
\ No newline at end of file
diff --git a/Assets/YooAsset/Runtime/PatchSystem/PlayMode/EditorSimulateModeImpl.cs b/Assets/YooAsset/Runtime/PatchSystem/PlayMode/EditorSimulateModeImpl.cs
index cb116d8..0147a7a 100644
--- a/Assets/YooAsset/Runtime/PatchSystem/PlayMode/EditorSimulateModeImpl.cs
+++ b/Assets/YooAsset/Runtime/PatchSystem/PlayMode/EditorSimulateModeImpl.cs
@@ -16,7 +16,7 @@ namespace YooAsset
{
_locationToLower = locationToLower;
var operation = new EditorSimulateModeInitializationOperation(this, simulatePatchManifestPath);
- OperationSystem.StartOperaiton(operation);
+ OperationSystem.StartOperation(operation);
return operation;
}
diff --git a/Assets/YooAsset/Runtime/PatchSystem/PlayMode/HostPlayModeImpl.cs b/Assets/YooAsset/Runtime/PatchSystem/PlayMode/HostPlayModeImpl.cs
index 11a232b..04f56fc 100644
--- a/Assets/YooAsset/Runtime/PatchSystem/PlayMode/HostPlayModeImpl.cs
+++ b/Assets/YooAsset/Runtime/PatchSystem/PlayMode/HostPlayModeImpl.cs
@@ -33,7 +33,7 @@ namespace YooAsset
_fallbackHostServer = fallbackHostServer;
var operation = new HostPlayModeInitializationOperation(this);
- OperationSystem.StartOperaiton(operation);
+ OperationSystem.StartOperation(operation);
return operation;
}
@@ -43,7 +43,7 @@ namespace YooAsset
public UpdateStaticVersionOperation UpdateStaticVersionAsync(int timeout)
{
var operation = new HostPlayModeUpdateStaticVersionOperation(this, timeout);
- OperationSystem.StartOperaiton(operation);
+ OperationSystem.StartOperation(operation);
return operation;
}
@@ -53,7 +53,7 @@ namespace YooAsset
public UpdateManifestOperation UpdatePatchManifestAsync(int resourceVersion, int timeout)
{
var operation = new HostPlayModeUpdateManifestOperation(this, resourceVersion, timeout);
- OperationSystem.StartOperaiton(operation);
+ OperationSystem.StartOperation(operation);
return operation;
}
@@ -63,7 +63,7 @@ namespace YooAsset
public UpdateManifestOperation WeaklyUpdatePatchManifestAsync(int resourceVersion)
{
var operation = new HostPlayModeWeaklyUpdateManifestOperation(this, resourceVersion);
- OperationSystem.StartOperaiton(operation);
+ OperationSystem.StartOperation(operation);
return operation;
}
@@ -73,7 +73,7 @@ namespace YooAsset
public UpdatePackageOperation UpdatePackageAsync(int resourceVersion, int timeout)
{
var operation = new HostPlayModeUpdatePackageOperation(this, resourceVersion, timeout);
- OperationSystem.StartOperaiton(operation);
+ OperationSystem.StartOperation(operation);
return operation;
}
@@ -138,7 +138,7 @@ namespace YooAsset
// 注意:如果是APP资源并且哈希值相同,则不需要下载
if (AppPatchManifest.TryGetPatchBundle(patchBundle.BundleName, out PatchBundle appPatchBundle))
{
- if (appPatchBundle.IsBuildin && appPatchBundle.FileHash == patchBundle.FileHash)
+ if (appPatchBundle.IsBuildin && appPatchBundle.Equals(patchBundle))
continue;
}
@@ -170,7 +170,7 @@ namespace YooAsset
// 注意:如果是APP资源并且哈希值相同,则不需要下载
if (AppPatchManifest.TryGetPatchBundle(patchBundle.BundleName, out PatchBundle appPatchBundle))
{
- if (appPatchBundle.IsBuildin && appPatchBundle.FileHash == patchBundle.FileHash)
+ if (appPatchBundle.IsBuildin && appPatchBundle.Equals(patchBundle))
continue;
}
@@ -240,7 +240,7 @@ namespace YooAsset
// 注意:如果是APP资源并且哈希值相同,则不需要下载
if (AppPatchManifest.TryGetPatchBundle(patchBundle.BundleName, out PatchBundle appPatchBundle))
{
- if (appPatchBundle.IsBuildin && appPatchBundle.FileHash == patchBundle.FileHash)
+ if (appPatchBundle.IsBuildin && appPatchBundle.Equals(patchBundle))
continue;
}
@@ -386,7 +386,7 @@ namespace YooAsset
// 查询APP资源
if (AppPatchManifest.TryGetPatchBundle(patchBundle.BundleName, out PatchBundle appPatchBundle))
{
- if (appPatchBundle.IsBuildin && appPatchBundle.FileHash == patchBundle.FileHash)
+ if (appPatchBundle.IsBuildin && appPatchBundle.Equals(patchBundle))
{
BundleInfo bundleInfo = new BundleInfo(appPatchBundle, BundleInfo.ELoadMode.LoadFromStreaming);
return bundleInfo;
diff --git a/Assets/YooAsset/Runtime/PatchSystem/PlayMode/OfflinePlayModeImpl.cs b/Assets/YooAsset/Runtime/PatchSystem/PlayMode/OfflinePlayModeImpl.cs
index 8a711d6..d5dd47c 100644
--- a/Assets/YooAsset/Runtime/PatchSystem/PlayMode/OfflinePlayModeImpl.cs
+++ b/Assets/YooAsset/Runtime/PatchSystem/PlayMode/OfflinePlayModeImpl.cs
@@ -16,7 +16,7 @@ namespace YooAsset
{
_locationToLower = locationToLower;
var operation = new OfflinePlayModeInitializationOperation(this);
- OperationSystem.StartOperaiton(operation);
+ OperationSystem.StartOperation(operation);
return operation;
}
diff --git a/Assets/YooAsset/Runtime/YooAssets.cs b/Assets/YooAsset/Runtime/YooAssets.cs
index 6d5c3d1..399fcf5 100644
--- a/Assets/YooAsset/Runtime/YooAssets.cs
+++ b/Assets/YooAsset/Runtime/YooAssets.cs
@@ -261,13 +261,13 @@ namespace YooAsset
if (_playMode == EPlayMode.EditorSimulateMode)
{
var operation = new EditorPlayModeUpdateStaticVersionOperation();
- OperationSystem.StartOperaiton(operation);
+ OperationSystem.StartOperation(operation);
return operation;
}
else if (_playMode == EPlayMode.OfflinePlayMode)
{
var operation = new OfflinePlayModeUpdateStaticVersionOperation();
- OperationSystem.StartOperaiton(operation);
+ OperationSystem.StartOperation(operation);
return operation;
}
else if (_playMode == EPlayMode.HostPlayMode)
@@ -291,13 +291,13 @@ namespace YooAsset
if (_playMode == EPlayMode.EditorSimulateMode)
{
var operation = new EditorPlayModeUpdateManifestOperation();
- OperationSystem.StartOperaiton(operation);
+ OperationSystem.StartOperation(operation);
return operation;
}
else if (_playMode == EPlayMode.OfflinePlayMode)
{
var operation = new OfflinePlayModeUpdateManifestOperation();
- OperationSystem.StartOperaiton(operation);
+ OperationSystem.StartOperation(operation);
return operation;
}
else if (_playMode == EPlayMode.HostPlayMode)
@@ -321,13 +321,13 @@ namespace YooAsset
if (_playMode == EPlayMode.EditorSimulateMode)
{
var operation = new EditorPlayModeUpdateManifestOperation();
- OperationSystem.StartOperaiton(operation);
+ OperationSystem.StartOperation(operation);
return operation;
}
else if (_playMode == EPlayMode.OfflinePlayMode)
{
var operation = new OfflinePlayModeUpdateManifestOperation();
- OperationSystem.StartOperaiton(operation);
+ OperationSystem.StartOperation(operation);
return operation;
}
else if (_playMode == EPlayMode.HostPlayMode)
@@ -344,9 +344,9 @@ namespace YooAsset
/// 开启一个异步操作
///
/// 异步操作对象
- public static void StartOperaiton(GameAsyncOperation operation)
+ public static void StartOperation(GameAsyncOperation operation)
{
- OperationSystem.StartOperaiton(operation);
+ OperationSystem.StartOperation(operation);
}
///
@@ -512,7 +512,7 @@ namespace YooAsset
if (assetInfo.IsInvalid)
{
RawFileOperation operation = new CompletedRawFileOperation(assetInfo.Error, copyPath);
- OperationSystem.StartOperaiton(operation);
+ OperationSystem.StartOperation(operation);
return operation;
}
@@ -522,26 +522,26 @@ namespace YooAsset
string error = $"Cannot load asset bundle file using {nameof(GetRawFileAsync)} interfaces !";
YooLogger.Warning(error);
RawFileOperation operation = new CompletedRawFileOperation(error, copyPath);
- OperationSystem.StartOperaiton(operation);
+ OperationSystem.StartOperation(operation);
return operation;
}
if (_playMode == EPlayMode.EditorSimulateMode)
{
RawFileOperation operation = new EditorPlayModeRawFileOperation(bundleInfo, copyPath);
- OperationSystem.StartOperaiton(operation);
+ OperationSystem.StartOperation(operation);
return operation;
}
else if (_playMode == EPlayMode.OfflinePlayMode)
{
RawFileOperation operation = new OfflinePlayModeRawFileOperation(bundleInfo, copyPath);
- OperationSystem.StartOperaiton(operation);
+ OperationSystem.StartOperation(operation);
return operation;
}
else if (_playMode == EPlayMode.HostPlayMode)
{
RawFileOperation operation = new HostPlayModeRawFileOperation(bundleInfo, copyPath);
- OperationSystem.StartOperaiton(operation);
+ OperationSystem.StartOperation(operation);
return operation;
}
else
@@ -959,13 +959,13 @@ namespace YooAsset
if (_playMode == EPlayMode.EditorSimulateMode)
{
var operation = new EditorPlayModeUpdatePackageOperation();
- OperationSystem.StartOperaiton(operation);
+ OperationSystem.StartOperation(operation);
return operation;
}
else if (_playMode == EPlayMode.OfflinePlayMode)
{
var operation = new OfflinePlayModeUpdatePackageOperation();
- OperationSystem.StartOperaiton(operation);
+ OperationSystem.StartOperation(operation);
return operation;
}
else if (_playMode == EPlayMode.HostPlayMode)