[fix] 修复Library/PlayerDataCache目录不存在时,PatchScriptingAssembliesJsonHook运行异常的bug
parent
2d5f71f6b7
commit
9afbe3bd84
|
@ -35,7 +35,10 @@ namespace HybridCLR.MonoHook
|
||||||
|
|
||||||
private static string BuildMainWindowTitle()
|
private static string BuildMainWindowTitle()
|
||||||
{
|
{
|
||||||
foreach (var tempJsonPath in Directory.GetDirectories($"{Application.dataPath}/../Library/PlayerDataCache", "*", SearchOption.TopDirectoryOnly))
|
var cacheDir = $"{Application.dataPath}/../Library/PlayerDataCache";
|
||||||
|
if (Directory.Exists(cacheDir))
|
||||||
|
{
|
||||||
|
foreach (var tempJsonPath in Directory.GetDirectories(cacheDir, "*", SearchOption.TopDirectoryOnly))
|
||||||
{
|
{
|
||||||
string dirName = Path.GetFileName(tempJsonPath);
|
string dirName = Path.GetFileName(tempJsonPath);
|
||||||
#if UNITY_WEIXINMINIGAME
|
#if UNITY_WEIXINMINIGAME
|
||||||
|
@ -55,6 +58,7 @@ namespace HybridCLR.MonoHook
|
||||||
var patcher = new PatchScriptingAssemblyList();
|
var patcher = new PatchScriptingAssemblyList();
|
||||||
patcher.PathScriptingAssembilesFile(tempJsonPath);
|
patcher.PathScriptingAssembilesFile(tempJsonPath);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
string newTitle = BuildMainWindowTitleProxy();
|
string newTitle = BuildMainWindowTitleProxy();
|
||||||
return newTitle;
|
return newTitle;
|
||||||
|
|
Loading…
Reference in New Issue