mirror of https://github.com/tuyoogame/YooAsset
update patch system
UpdatePackageManifestOperation增加新方法FlushManifestVersionFile()pull/86/head
parent
027ae02aa0
commit
91fe51d10a
|
@ -9,6 +9,10 @@ namespace YooAsset
|
|||
/// </summary>
|
||||
public abstract class UpdatePackageManifestOperation : AsyncOperationBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 保存清单版本文件到沙盒
|
||||
/// </summary>
|
||||
public virtual void FlushManifestVersionFile() { }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -173,5 +177,10 @@ namespace YooAsset
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void FlushManifestVersionFile()
|
||||
{
|
||||
_impl.FlushManifestVersionFile();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -33,9 +33,8 @@ namespace YooAsset
|
|||
return _activeManifest;
|
||||
}
|
||||
}
|
||||
public bool IsBuildinPackageBundle(PackageBundle packageBundle)
|
||||
public void FlushManifestVersionFile()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
UpdatePackageVersionOperation IPlayModeServices.UpdatePackageVersionAsync(bool appendTimeTicks, int timeout)
|
||||
|
|
|
@ -84,22 +84,27 @@ namespace YooAsset
|
|||
{
|
||||
_activeManifest = value;
|
||||
_activeManifest.InitAssetPathMapping(_locationToLower);
|
||||
PersistentHelper.SaveCachePackageVersionFile(_packageName, _activeManifest.PackageVersion);
|
||||
}
|
||||
get
|
||||
{
|
||||
return _activeManifest;
|
||||
}
|
||||
}
|
||||
public bool IsBuildinPackageBundle(PackageBundle packageBundle)
|
||||
public void FlushManifestVersionFile()
|
||||
{
|
||||
if (_activeManifest != null)
|
||||
PersistentHelper.SaveCachePackageVersionFile(_packageName, _activeManifest.PackageVersion);
|
||||
}
|
||||
|
||||
private bool IsBuildinPackageBundle(PackageBundle packageBundle)
|
||||
{
|
||||
return _queryServices.QueryStreamingAssets(packageBundle.FileName);
|
||||
}
|
||||
public bool IsCachedPackageBundle(PackageBundle packageBundle)
|
||||
private bool IsCachedPackageBundle(PackageBundle packageBundle)
|
||||
{
|
||||
return CacheSystem.IsCached(packageBundle.PackageName, packageBundle.CacheGUID);
|
||||
}
|
||||
|
||||
|
||||
UpdatePackageVersionOperation IPlayModeServices.UpdatePackageVersionAsync(bool appendTimeTicks, int timeout)
|
||||
{
|
||||
var operation = new HostPlayModeUpdatePackageVersionOperation(this, _packageName, appendTimeTicks, timeout);
|
||||
|
|
|
@ -33,9 +33,8 @@ namespace YooAsset
|
|||
return _activeManifest;
|
||||
}
|
||||
}
|
||||
public bool IsBuildinPackageBundle(PackageBundle packageBundle)
|
||||
public void FlushManifestVersionFile()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
UpdatePackageVersionOperation IPlayModeServices.UpdatePackageVersionAsync(bool appendTimeTicks, int timeout)
|
||||
|
|
|
@ -7,11 +7,11 @@ namespace YooAsset
|
|||
/// 激活的清单
|
||||
/// </summary>
|
||||
PackageManifest ActiveManifest { set; get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否为内置资源文件
|
||||
/// 保存清单版本文件到沙盒
|
||||
/// </summary>
|
||||
bool IsBuildinPackageBundle(PackageBundle packageBundle);
|
||||
void FlushManifestVersionFile();
|
||||
|
||||
/// <summary>
|
||||
/// 向网络端请求最新的资源版本
|
||||
|
|
Loading…
Reference in New Issue