mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-27 11:10:11 +00:00
update extension sample
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user