Forest_Client/Forest/Assets/PhxhSDK/AOT/YooAsset/YooDecryptionFS.cs

25 lines
714 B
C#
Raw Normal View History

2024-06-12 15:01:54 +08:00
using System.IO;
using UnityEngine;
using YooAsset;
namespace PhxhSDK.AOT
{
public class YooDecryptionFS : IDecryptionServices
{
public AssetBundle LoadAssetBundle(DecryptFileInfo fileInfo,
out Stream managedStream)
{
managedStream = new CustomFileStream(fileInfo.FileLoadPath);
return AssetBundle.LoadFromStream(managedStream);
}
public AssetBundleCreateRequest LoadAssetBundleAsync(DecryptFileInfo fileInfo,
out Stream managedStream)
{
managedStream = new CustomFileStream(fileInfo.FileLoadPath);
return AssetBundle.LoadFromStreamAsync(managedStream);
}
}
}