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