【m】框架大更新

This commit is contained in:
2025-10-31 11:18:23 +08:00
parent ae6e7c804b
commit 8e1d52ddbf
1883 changed files with 213934 additions and 640 deletions
@@ -0,0 +1,42 @@
#if UNITY_ANDROID && GOOGLE_PLAY
using System.Collections.Generic;
using UnityEngine;
using YooAsset;
using System.Linq;
using System;
public static class GooglePlayFileSystemCreater
{
public static FileSystemParameters CreateFileSystemParameters(string packageRoot)
{
string fileSystemClass = $"{nameof(GooglePlayFileSystem)},YooAsset.MiniGame";
var fileSystemParams = new FileSystemParameters(fileSystemClass, packageRoot);
return fileSystemParams;
}
}
/// <summary>
/// 兼容谷歌Play Asset Delivery的文件系统
/// </summary>
internal class GooglePlayFileSystem : DefaultBuildinFileSystem
{
public GooglePlayFileSystem()
{
}
public override FSLoadBundleOperation LoadBundleFile(PackageBundle bundle)
{
if (bundle.BundleType == (int)EBuildBundleType.AssetBundle)
{
var operation = new GPFSLoadAssetBundleOperation(this, bundle);
return operation;
}
else
{
string error = $"{nameof(GooglePlayFileSystem)} not support load bundle type : {bundle.BundleType}";
var operation = new FSLoadBundleCompleteOperation(error);
return operation;
}
}
}
#endif