update space shooter

pull/122/head
hevinci 2023-06-21 14:21:12 +08:00
parent 95111ef1e1
commit 9dde15ac41
1 changed files with 15 additions and 9 deletions

View File

@ -15,6 +15,19 @@ public class GameQueryServices : IQueryServices
}
}
#if UNITY_EDITOR
/// <summary>
/// StreamingAssets目录下资源查询帮助类
/// </summary>
public sealed class StreamingAssetsHelper
{
public static void Init() { }
public static bool FileExists(string fileName)
{
return File.Exists(Path.Combine(Application.streamingAssetsPath, "BuildinFiles", fileName));
}
}
#else
/// <summary>
/// StreamingAssets目录下资源查询帮助类
/// </summary>
@ -23,13 +36,6 @@ public sealed class StreamingAssetsHelper
private static bool _isInit = false;
private static readonly HashSet<string> _cacheData = new HashSet<string>();
#if UNITY_EDITOR
public static void Init() { _isInit = true; }
public static bool FileExists(string fileName)
{
return File.Exists(System.IO.Path.Combine(Application.streamingAssetsPath, "BuildinFiles", fileName));
}
#else
/// <summary>
/// 初始化
/// </summary>
@ -53,11 +59,11 @@ public sealed class StreamingAssetsHelper
{
if (_isInit == false)
Init();
return _cacheData.Contains(fileName);
}
#endif
}
#endif
#if UNITY_EDITOR
internal class PreprocessBuild : UnityEditor.Build.IPreprocessBuildWithReport