[fix] 修复偶然情况下build apk包时,PatchScriptingAssemblyList 传递参数为apk路径,导致patch失败的bug
parent
a52ab358b3
commit
590505195e
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 94c0855e86b12b64b8c1d29c51ac795d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -24,14 +24,19 @@ namespace HybridCLR.Editor.BuildProcessors
|
|||
{
|
||||
public int callbackOrder => 0;
|
||||
|
||||
|
||||
|
||||
|
||||
public void OnPostGenerateGradleAndroidProject(string path)
|
||||
{
|
||||
// 如果直接打包apk,没有机会在PostprocessBuild中修改ScriptingAssemblies.json。
|
||||
// 因此需要在这个时机处理
|
||||
PathScriptingAssembilesFile(path);
|
||||
// Unity有bug,偶然情况下会传入apk的路径,导致替换失败
|
||||
if (Directory.Exists(path))
|
||||
{
|
||||
PathScriptingAssembilesFile(path);
|
||||
}
|
||||
else
|
||||
{
|
||||
PathScriptingAssembilesFile($"{SettingsUtil.ProjectDir}/Library");
|
||||
}
|
||||
}
|
||||
|
||||
public void OnPostprocessBuild(BuildReport report)
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c7268273c19288b44a2ac493c8db07cd
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Reference in New Issue