using System.IO; using System.Collections.Generic; using UnityEngine; using YooAsset; /// /// 资源文件查询服务类 /// public class GameQueryServices { public bool Query(string packageName, string fileName) { // 注意:fileName包含文件格式 return StreamingAssetsHelper.FileExists(packageName, fileName); } public bool Query(string packageName, string fileName, string fileCRC)=>Query(packageName,fileName); } /// /// StreamingAssets目录下资源查询帮助类 /// public sealed class StreamingAssetsHelper { public static void Init() { } public static bool FileExists(string packageName, string fileName) { string filePath = Path.Combine(Application.streamingAssetsPath, packageName, fileName); return File.Exists(filePath); } }