[fix] 修复微信小游戏平台当TextureCompression非默认值时临时目录名为WinxinMiniGame{xxx},导致没有成功修改scriptingassemblies.json文件的bug
parent
0b455eb882
commit
5747458bf2
|
@ -35,18 +35,27 @@ namespace HybridCLR.MonoHook
|
|||
|
||||
private static string BuildMainWindowTitle()
|
||||
{
|
||||
foreach (var tempJsonPath in Directory.GetDirectories($"{Application.dataPath}/../Library/PlayerDataCache", "*", SearchOption.TopDirectoryOnly))
|
||||
{
|
||||
string dirName = Path.GetFileName(tempJsonPath);
|
||||
#if UNITY_WEIXINMINIGAME
|
||||
Debug.Assert(EditorUserBuildSettings.activeBuildTarget == BuildTarget.WeixinMiniGame);
|
||||
string tempJsonPath = $"{Application.dataPath}/../Library/PlayerDataCache/WeixinMiniGame/Data/ScriptingAssemblies.json";
|
||||
if (!dirName.Contains("WeixinMiniGame"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
#else
|
||||
Debug.Assert(EditorUserBuildSettings.activeBuildTarget == BuildTarget.WebGL);
|
||||
string tempJsonPath = $"{Application.dataPath}/../Library/PlayerDataCache/WebGL/Data/ScriptingAssemblies.json";
|
||||
#endif
|
||||
if (File.Exists(tempJsonPath))
|
||||
if (!dirName.Contains("WebGL"))
|
||||
{
|
||||
var patcher = new PatchScriptingAssemblyList();
|
||||
patcher.PathScriptingAssembilesFile(Path.GetDirectoryName(tempJsonPath));
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
var patcher = new PatchScriptingAssemblyList();
|
||||
patcher.PathScriptingAssembilesFile(tempJsonPath);
|
||||
}
|
||||
|
||||
string newTitle = BuildMainWindowTitleProxy();
|
||||
return newTitle;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue