mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
TEngine全面更新,升级YooAsset2.1.1、UniTask、UIWindow、I2Localization
TEngine全面更新,升级YooAsset2.1.1、UniTask、UIWindow、I2Localization
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
public interface IBuildinQueryServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询应用程序里的内置资源是否存在
|
||||
/// </summary>
|
||||
bool QueryStreamingAssets(string packageName, string fileName);
|
||||
}
|
||||
public interface IBuildinQueryServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询是否为应用程序内置的资源文件
|
||||
/// </summary>
|
||||
/// <param name="packageName">包裹名称</param>
|
||||
/// <param name="fileName">文件名称(包含文件的后缀格式)</param>
|
||||
/// <param name="fileCRC">文件哈希值</param>
|
||||
/// <returns>返回查询结果</returns>
|
||||
bool Query(string packageName, string fileName, string fileCRC);
|
||||
}
|
||||
}
|
@@ -1,42 +1,44 @@
|
||||
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
public struct DecryptFileInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 资源包名称
|
||||
/// </summary>
|
||||
public string BundleName;
|
||||
/// <summary>
|
||||
/// 解密文件的信息
|
||||
/// </summary>
|
||||
public struct DecryptFileInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 资源包名称
|
||||
/// </summary>
|
||||
public string BundleName;
|
||||
|
||||
/// <summary>
|
||||
/// 文件路径
|
||||
/// </summary>
|
||||
public string FilePath;
|
||||
}
|
||||
/// <summary>
|
||||
/// 文件加载路径
|
||||
/// </summary>
|
||||
public string FileLoadPath;
|
||||
|
||||
/// <summary>
|
||||
/// 解密类服务接口
|
||||
/// </summary>
|
||||
public interface IDecryptionServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 文件偏移解密方法
|
||||
/// </summary>
|
||||
ulong LoadFromFileOffset(DecryptFileInfo fileInfo);
|
||||
/// <summary>
|
||||
/// Unity引擎用于内容校验的CRC
|
||||
/// </summary>
|
||||
public uint ConentCRC;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 文件内存解密方法
|
||||
/// </summary>
|
||||
byte[] LoadFromMemory(DecryptFileInfo fileInfo);
|
||||
/// <summary>
|
||||
/// 解密类服务接口
|
||||
/// </summary>
|
||||
public interface IDecryptionServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 同步方式获取解密的资源包对象
|
||||
/// 注意:加载流对象在资源包对象释放的时候会自动释放
|
||||
/// </summary>
|
||||
AssetBundle LoadAssetBundle(DecryptFileInfo fileInfo, out Stream managedStream);
|
||||
|
||||
/// <summary>
|
||||
/// 文件流解密方法
|
||||
/// </summary>
|
||||
System.IO.Stream LoadFromStream(DecryptFileInfo fileInfo);
|
||||
|
||||
/// <summary>
|
||||
/// 文件流解密的托管缓存大小
|
||||
/// </summary>
|
||||
uint GetManagedReadBufferSize();
|
||||
}
|
||||
/// <summary>
|
||||
/// 异步方式获取解密的资源包对象
|
||||
/// 注意:加载流对象在资源包对象释放的时候会自动释放
|
||||
/// </summary>
|
||||
AssetBundleCreateRequest LoadAssetBundleAsync(DecryptFileInfo fileInfo, out Stream managedStream);
|
||||
}
|
||||
}
|
@@ -0,0 +1,43 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
/// <summary>
|
||||
/// 分发的资源信息
|
||||
/// </summary>
|
||||
public struct DeliveryFileInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 资源包名称
|
||||
/// </summary>
|
||||
public string BundleName;
|
||||
|
||||
/// <summary>
|
||||
/// 文件加载路径
|
||||
/// </summary>
|
||||
public string FileLoadPath;
|
||||
|
||||
/// <summary>
|
||||
/// Unity引擎用于内容校验的CRC
|
||||
/// </summary>
|
||||
public uint ConentCRC;
|
||||
|
||||
/// <summary>
|
||||
/// 资源包是否加密
|
||||
/// </summary>
|
||||
public bool Encrypted;
|
||||
}
|
||||
|
||||
public interface IDeliveryLoadServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 同步方式获取分发的资源包对象
|
||||
/// </summary>
|
||||
AssetBundle LoadAssetBundle(DeliveryFileInfo fileInfo);
|
||||
|
||||
/// <summary>
|
||||
/// 异步方式获取分发的资源包对象
|
||||
/// </summary>
|
||||
AssetBundleCreateRequest LoadAssetBundleAsync(DeliveryFileInfo fileInfo);
|
||||
}
|
||||
}
|
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4629f36c31a96214b9057827c6a283cf
|
||||
guid: 5233328bd3a1b944da521581d61aae78
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
@@ -1,25 +1,23 @@
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
/// <summary>
|
||||
/// 分发的资源信息
|
||||
/// </summary>
|
||||
public struct DeliveryFileInfo
|
||||
{
|
||||
public string DeliveryFilePath;
|
||||
public ulong DeliveryFileOffset;
|
||||
}
|
||||
|
||||
public interface IDeliveryQueryServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询是否为开发者分发的资源
|
||||
/// </summary>
|
||||
bool QueryDeliveryFiles(string packageName, string fileName);
|
||||
public interface IDeliveryQueryServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询是否为开发者分发的资源文件
|
||||
/// </summary>
|
||||
/// <param name="packageName">包裹名称</param>
|
||||
/// <param name="fileName">文件名称(包含文件的后缀格式)</param>
|
||||
/// <param name="fileCRC">文件哈希值</param>
|
||||
/// <returns>返回查询结果</returns>
|
||||
bool Query(string packageName, string fileName, string fileCRC);
|
||||
|
||||
/// <summary>
|
||||
/// 获取开发者分发的资源信息
|
||||
/// </summary>
|
||||
DeliveryFileInfo GetDeliveryFileInfo(string packageName, string fileName);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取分发资源文件的路径
|
||||
/// </summary>
|
||||
/// <param name="packageName">包裹名称</param>
|
||||
/// <param name="fileName">文件名称(包含文件的后缀格式)</param>
|
||||
/// <returns>返回资源文件的路径</returns>
|
||||
string GetFilePath(string packageName, string fileName);
|
||||
}
|
||||
}
|
@@ -1,37 +1,37 @@
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
public struct EncryptResult
|
||||
{
|
||||
/// <summary>
|
||||
/// 加密后的Bunlde文件加载方法
|
||||
/// </summary>
|
||||
public EBundleLoadMethod LoadMethod;
|
||||
|
||||
/// <summary>
|
||||
/// 加密后的文件数据
|
||||
/// </summary>
|
||||
public byte[] EncryptedData;
|
||||
}
|
||||
public struct EncryptResult
|
||||
{
|
||||
/// <summary>
|
||||
/// 文件是否加密
|
||||
/// </summary>
|
||||
public bool Encrypted;
|
||||
|
||||
public struct EncryptFileInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 资源包名称
|
||||
/// </summary>
|
||||
public string BundleName;
|
||||
/// <summary>
|
||||
/// 加密后的文件数据
|
||||
/// </summary>
|
||||
public byte[] EncryptedData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 文件路径
|
||||
/// </summary>
|
||||
public string FilePath;
|
||||
}
|
||||
public struct EncryptFileInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 资源包名称
|
||||
/// </summary>
|
||||
public string BundleName;
|
||||
|
||||
/// <summary>
|
||||
/// 加密服务类接口
|
||||
/// </summary>
|
||||
public interface IEncryptionServices
|
||||
{
|
||||
EncryptResult Encrypt(EncryptFileInfo fileInfo);
|
||||
}
|
||||
/// <summary>
|
||||
/// 文件路径
|
||||
/// </summary>
|
||||
public string FilePath;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加密服务类接口
|
||||
/// </summary>
|
||||
public interface IEncryptionServices
|
||||
{
|
||||
EncryptResult Encrypt(EncryptFileInfo fileInfo);
|
||||
}
|
||||
}
|
@@ -1,18 +1,18 @@
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
public interface IRemoteServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取主资源站的资源地址
|
||||
/// </summary>
|
||||
/// <param name="fileName">请求的文件名称</param>
|
||||
string GetRemoteMainURL(string fileName);
|
||||
public interface IRemoteServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取主资源站的资源地址
|
||||
/// </summary>
|
||||
/// <param name="fileName">请求的文件名称</param>
|
||||
string GetRemoteMainURL(string fileName);
|
||||
|
||||
/// <summary>
|
||||
/// 获取备用资源站的资源地址
|
||||
/// </summary>
|
||||
/// <param name="fileName">请求的文件名称</param>
|
||||
string GetRemoteFallbackURL(string fileName);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取备用资源站的资源地址
|
||||
/// </summary>
|
||||
/// <param name="fileName">请求的文件名称</param>
|
||||
string GetRemoteFallbackURL(string fileName);
|
||||
}
|
||||
}
|
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 40c870edb8e84064a8be2d56acb8bbc0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -1,26 +0,0 @@
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
internal interface IBundleServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取资源包信息
|
||||
/// </summary>
|
||||
BundleInfo GetBundleInfo(AssetInfo assetInfo);
|
||||
|
||||
/// <summary>
|
||||
/// 获取依赖的资源包信息集合
|
||||
/// </summary>
|
||||
BundleInfo[] GetAllDependBundleInfos(AssetInfo assetPath);
|
||||
|
||||
/// <summary>
|
||||
/// 获取资源包名称
|
||||
/// </summary>
|
||||
string GetBundleName(int bundleID);
|
||||
|
||||
/// <summary>
|
||||
/// 服务接口是否有效
|
||||
/// </summary>
|
||||
bool IsServicesValid();
|
||||
}
|
||||
}
|
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 70420213c551a2b4b8cf014067699b07
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -1,40 +0,0 @@
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
internal interface IPlayModeServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 激活的清单
|
||||
/// </summary>
|
||||
PackageManifest ActiveManifest { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// 保存清单版本文件到沙盒
|
||||
/// </summary>
|
||||
void FlushManifestVersionFile();
|
||||
|
||||
/// <summary>
|
||||
/// 向网络端请求最新的资源版本
|
||||
/// </summary>
|
||||
UpdatePackageVersionOperation UpdatePackageVersionAsync(bool appendTimeTicks, int timeout);
|
||||
|
||||
/// <summary>
|
||||
/// 向网络端请求并更新清单
|
||||
/// </summary>
|
||||
UpdatePackageManifestOperation UpdatePackageManifestAsync(string packageVersion, bool autoSaveVersion, int timeout);
|
||||
|
||||
/// <summary>
|
||||
/// 预下载指定版本的包裹内容
|
||||
/// </summary>
|
||||
PreDownloadContentOperation PreDownloadContentAsync(string packageVersion, int timeout);
|
||||
|
||||
// 下载相关
|
||||
ResourceDownloaderOperation CreateResourceDownloaderByAll(int downloadingMaxNumber, int failedTryAgain, int timeout);
|
||||
ResourceDownloaderOperation CreateResourceDownloaderByTags(string[] tags, int downloadingMaxNumber, int failedTryAgain, int timeout);
|
||||
ResourceDownloaderOperation CreateResourceDownloaderByPaths(AssetInfo[] assetInfos, int downloadingMaxNumber, int failedTryAgain, int timeout);
|
||||
|
||||
// 解压相关
|
||||
ResourceUnpackerOperation CreateResourceUnpackerByAll(int upackingMaxNumber, int failedTryAgain, int timeout);
|
||||
ResourceUnpackerOperation CreateResourceUnpackerByTags(string[] tags, int upackingMaxNumber, int failedTryAgain, int timeout);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user