update runtime code

代码里移除了Patch敏感字。
This commit is contained in:
hevinci
2023-03-11 00:06:40 +08:00
parent 10e04c7645
commit 67d09d95fa
38 changed files with 692 additions and 580 deletions
@@ -6,22 +6,22 @@ namespace YooAsset
{
internal class EditorSimulateModeImpl : IPlayModeServices, IBundleServices
{
private PatchManifest _activeManifest;
private PackageManifest _activeManifest;
private bool _locationToLower;
/// <summary>
/// 异步初始化
/// </summary>
public InitializationOperation InitializeAsync(bool locationToLower, string simulatePatchManifestPath)
public InitializationOperation InitializeAsync(bool locationToLower, string simulateManifestFilePath)
{
_locationToLower = locationToLower;
var operation = new EditorSimulateModeInitializationOperation(this, simulatePatchManifestPath);
var operation = new EditorSimulateModeInitializationOperation(this, simulateManifestFilePath);
OperationSystem.StartOperation(operation);
return operation;
}
#region IPlayModeServices接口
public PatchManifest ActiveManifest
public PackageManifest ActiveManifest
{
set
{
@@ -33,7 +33,7 @@ namespace YooAsset
return _activeManifest;
}
}
public bool IsBuildinPatchBundle(PatchBundle patchBundle)
public bool IsBuildinPackageBundle(PackageBundle packageBundle)
{
return true;
}
@@ -50,33 +50,33 @@ namespace YooAsset
OperationSystem.StartOperation(operation);
return operation;
}
PreDownloadPackageOperation IPlayModeServices.PreDownloadPackageAsync(string packageVersion, int timeout)
PreDownloadContentOperation IPlayModeServices.PreDownloadContentAsync(string packageVersion, int timeout)
{
var operation = new EditorPlayModePreDownloadPackageOperation();
var operation = new EditorPlayModePreDownloadContentOperation();
OperationSystem.StartOperation(operation);
return operation;
}
PatchDownloaderOperation IPlayModeServices.CreatePatchDownloaderByAll(int downloadingMaxNumber, int failedTryAgain, int timeout)
ResourceDownloaderOperation IPlayModeServices.CreateResourceDownloaderByAll(int downloadingMaxNumber, int failedTryAgain, int timeout)
{
return PatchDownloaderOperation.CreateEmptyDownloader(downloadingMaxNumber, failedTryAgain, timeout);
return ResourceDownloaderOperation.CreateEmptyDownloader(downloadingMaxNumber, failedTryAgain, timeout);
}
PatchDownloaderOperation IPlayModeServices.CreatePatchDownloaderByTags(string[] tags, int downloadingMaxNumber, int failedTryAgain, int timeout)
ResourceDownloaderOperation IPlayModeServices.CreateResourceDownloaderByTags(string[] tags, int downloadingMaxNumber, int failedTryAgain, int timeout)
{
return PatchDownloaderOperation.CreateEmptyDownloader(downloadingMaxNumber, failedTryAgain, timeout);
return ResourceDownloaderOperation.CreateEmptyDownloader(downloadingMaxNumber, failedTryAgain, timeout);
}
PatchDownloaderOperation IPlayModeServices.CreatePatchDownloaderByPaths(AssetInfo[] assetInfos, int downloadingMaxNumber, int failedTryAgain, int timeout)
ResourceDownloaderOperation IPlayModeServices.CreateResourceDownloaderByPaths(AssetInfo[] assetInfos, int downloadingMaxNumber, int failedTryAgain, int timeout)
{
return PatchDownloaderOperation.CreateEmptyDownloader(downloadingMaxNumber, failedTryAgain, timeout);
return ResourceDownloaderOperation.CreateEmptyDownloader(downloadingMaxNumber, failedTryAgain, timeout);
}
PatchUnpackerOperation IPlayModeServices.CreatePatchUnpackerByAll(int upackingMaxNumber, int failedTryAgain, int timeout)
ResourceUnpackerOperation IPlayModeServices.CreateResourceUnpackerByAll(int upackingMaxNumber, int failedTryAgain, int timeout)
{
return PatchUnpackerOperation.CreateEmptyUnpacker(upackingMaxNumber, failedTryAgain, timeout);
return ResourceUnpackerOperation.CreateEmptyUnpacker(upackingMaxNumber, failedTryAgain, timeout);
}
PatchUnpackerOperation IPlayModeServices.CreatePatchUnpackerByTags(string[] tags, int upackingMaxNumber, int failedTryAgain, int timeout)
ResourceUnpackerOperation IPlayModeServices.CreateResourceUnpackerByTags(string[] tags, int upackingMaxNumber, int failedTryAgain, int timeout)
{
return PatchUnpackerOperation.CreateEmptyUnpacker(upackingMaxNumber, failedTryAgain, timeout);
return ResourceUnpackerOperation.CreateEmptyUnpacker(upackingMaxNumber, failedTryAgain, timeout);
}
#endregion
@@ -86,9 +86,9 @@ namespace YooAsset
if (assetInfo.IsInvalid)
throw new Exception("Should never get here !");
// 注意:如果补丁清单里未找到资源包会抛出异常!
var patchBundle = _activeManifest.GetMainPatchBundle(assetInfo.AssetPath);
BundleInfo bundleInfo = new BundleInfo(patchBundle, BundleInfo.ELoadMode.LoadFromEditor, assetInfo.AssetPath);
// 注意:如果清单里未找到资源包会抛出异常!
var packageBundle = _activeManifest.GetMainPackageBundle(assetInfo.AssetPath);
BundleInfo bundleInfo = new BundleInfo(packageBundle, BundleInfo.ELoadMode.LoadFromEditor, assetInfo.AssetPath);
return bundleInfo;
}
BundleInfo[] IBundleServices.GetAllDependBundleInfos(AssetInfo assetInfo)