Compare commits
2 Commits
Author | SHA1 | Date |
---|---|---|
hevinci | dc33abde46 | |
hevinci | aae7b08dd1 |
|
@ -246,7 +246,7 @@ namespace YooAsset
|
|||
var result = CacheSystem.VerifyingRecordFile(MainBundleInfo.Bundle.PackageName, MainBundleInfo.Bundle.CacheGUID);
|
||||
if (result != EVerifyResult.Succeed)
|
||||
{
|
||||
YooLogger.Error($"Found possibly corrupt file ! {MainBundleInfo.Bundle.CacheGUID}");
|
||||
YooLogger.Error($"Found possibly corrupt file ! {MainBundleInfo.Bundle.CacheGUID} Verify result : {result}");
|
||||
CacheSystem.DiscardFile(MainBundleInfo.Bundle.PackageName, MainBundleInfo.Bundle.CacheGUID);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,13 @@ public sealed class StreamingAssetsHelper
|
|||
private static bool _isInit = false;
|
||||
private static readonly HashSet<string> _cacheData = new HashSet<string>();
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public static void Init() { _isInit = true; }
|
||||
public static bool FileExists(string fileName)
|
||||
{
|
||||
return File.Exists(System.IO.Path.Combine(Application.streamingAssetsPath, "BuildinFiles", fileName));
|
||||
}
|
||||
#else
|
||||
/// <summary>
|
||||
/// 初始化
|
||||
/// </summary>
|
||||
|
@ -49,6 +56,7 @@ public sealed class StreamingAssetsHelper
|
|||
|
||||
return _cacheData.Contains(fileName);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
|
|
Loading…
Reference in New Issue