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

23 lines
758 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 YooDecryptionNone : IDecryptionServices
{
public AssetBundle LoadAssetBundle(DecryptFileInfo fileInfo,
out Stream managedStream)
{
managedStream = new FileStream(fileInfo.FileLoadPath, FileMode.Open, FileAccess.Read);
return AssetBundle.LoadFromStream(managedStream);
}
public AssetBundleCreateRequest LoadAssetBundleAsync(DecryptFileInfo fileInfo,
out Stream managedStream)
{
managedStream = new FileStream(fileInfo.FileLoadPath, FileMode.Open, FileAccess.Read);
return AssetBundle.LoadFromStreamAsync(managedStream);
}
}
}