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