mirror of https://github.com/tuyoogame/YooAsset
update extension sample
parent
a9a9368b9b
commit
9e806861ec
|
@ -62,7 +62,7 @@ internal class TTFSLoadBundleOperation : FSLoadBundleOperation
|
||||||
AssetBundle assetBundle;
|
AssetBundle assetBundle;
|
||||||
var downloadHanlder = _webRequest.downloadHandler as DownloadHandlerTTAssetBundle;
|
var downloadHanlder = _webRequest.downloadHandler as DownloadHandlerTTAssetBundle;
|
||||||
if (_bundle.Encrypted)
|
if (_bundle.Encrypted)
|
||||||
assetBundle = _fileSystem.LoadEncryptedAssetBundle(downloadHanlder.data);
|
assetBundle = _fileSystem.LoadEncryptedAssetBundle(_bundle, downloadHanlder.data);
|
||||||
else
|
else
|
||||||
assetBundle = downloadHanlder.assetBundle;
|
assetBundle = downloadHanlder.assetBundle;
|
||||||
|
|
||||||
|
|
|
@ -272,9 +272,14 @@ internal class TiktokFileSystem : IFileSystem
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 加载加密资源文件
|
/// 加载加密资源文件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public AssetBundle LoadEncryptedAssetBundle(byte[] fileData)
|
public AssetBundle LoadEncryptedAssetBundle(PackageBundle bundle, byte[] fileData)
|
||||||
{
|
{
|
||||||
return DecryptionServices.LoadAssetBundle(fileData);
|
WebDecryptFileInfo fileInfo = new WebDecryptFileInfo();
|
||||||
|
fileInfo.BundleName = bundle.BundleName;
|
||||||
|
fileInfo.FileLoadCRC = bundle.UnityCRC;
|
||||||
|
fileInfo.FileData = fileData;
|
||||||
|
var decryptResult = DecryptionServices.LoadAssetBundle(fileInfo);
|
||||||
|
return decryptResult.Result;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ internal class WXFSLoadBundleOperation : FSLoadBundleOperation
|
||||||
AssetBundle assetBundle;
|
AssetBundle assetBundle;
|
||||||
var downloadHanlder = _webRequest.downloadHandler as DownloadHandlerWXAssetBundle;
|
var downloadHanlder = _webRequest.downloadHandler as DownloadHandlerWXAssetBundle;
|
||||||
if (_bundle.Encrypted)
|
if (_bundle.Encrypted)
|
||||||
assetBundle = _fileSystem.LoadEncryptedAssetBundle(downloadHanlder.data);
|
assetBundle = _fileSystem.LoadEncryptedAssetBundle(_bundle, downloadHanlder.data);
|
||||||
else
|
else
|
||||||
assetBundle = downloadHanlder.assetBundle;
|
assetBundle = downloadHanlder.assetBundle;
|
||||||
|
|
||||||
|
|
|
@ -290,9 +290,14 @@ internal class WechatFileSystem : IFileSystem
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 加载加密资源文件
|
/// 加载加密资源文件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public AssetBundle LoadEncryptedAssetBundle(byte[] fileData)
|
public AssetBundle LoadEncryptedAssetBundle(PackageBundle bundle, byte[] fileData)
|
||||||
{
|
{
|
||||||
return DecryptionServices.LoadAssetBundle(fileData);
|
WebDecryptFileInfo fileInfo = new WebDecryptFileInfo();
|
||||||
|
fileInfo.BundleName = bundle.BundleName;
|
||||||
|
fileInfo.FileLoadCRC = bundle.UnityCRC;
|
||||||
|
fileInfo.FileData = fileData;
|
||||||
|
var decryptResult = DecryptionServices.LoadAssetBundle(fileInfo);
|
||||||
|
return decryptResult.Result;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue