特效新内容。修复gameplay致命bug和分数保存bug
This commit is contained in:
@@ -29,10 +29,13 @@ namespace Bansonic
|
||||
int totalFiles = 0;
|
||||
int corruptedFiles = 0;
|
||||
|
||||
// 在主线程提前获取路径,避免子线程调用 Unity API 报错
|
||||
string persistentPath = Application.persistentDataPath;
|
||||
|
||||
// 执行异步检查任务
|
||||
await Task.Run(() =>
|
||||
{
|
||||
string path = Application.persistentDataPath;
|
||||
string path = persistentPath;
|
||||
string[] files = Directory.GetFiles(path, "SongData_*.json");
|
||||
totalFiles = files.Length;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user