Simplify the concept of resource version

简化资源版本概念
This commit is contained in:
hevinci
2022-04-12 19:15:44 +08:00
parent 9fbce6a726
commit ea28d3e6e1
30 changed files with 516 additions and 322 deletions
@@ -20,15 +20,16 @@ namespace YooAsset
public static PatchCache LoadCache()
{
if (SandboxHelper.CheckSandboxCacheFileExist())
{
YooLogger.Log("Load patch cache from disk.");
{
string filePath = SandboxHelper.GetSandboxCacheFilePath();
string jsonData = FileUtility.ReadFile(filePath);
return JsonUtility.FromJson<PatchCache>(jsonData);
var patchCache = JsonUtility.FromJson<PatchCache>(jsonData);
YooLogger.Log($"Load cache file : {patchCache.CacheAppVersion}");
return patchCache;
}
else
{
YooLogger.Log($"Create patch cache to disk : {Application.version}");
YooLogger.Log($"Create cache file : {Application.version}");
PatchCache cache = new PatchCache();
cache.CacheAppVersion = Application.version;
string filePath = SandboxHelper.GetSandboxCacheFilePath();