diff --git a/Data/iOSBuild/build.meta b/Data/iOSBuild/build.meta deleted file mode 100644 index 35d8f2a..0000000 --- a/Data/iOSBuild/build.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 94c0855e86b12b64b8c1d29c51ac795d -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Editor/BuildProcessors/PatchScriptingAssemblyList.cs b/Editor/BuildProcessors/PatchScriptingAssemblyList.cs index 2d2192d..107cc8d 100644 --- a/Editor/BuildProcessors/PatchScriptingAssemblyList.cs +++ b/Editor/BuildProcessors/PatchScriptingAssemblyList.cs @@ -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) diff --git a/Tests/Editor.meta b/Tests/Editor.meta deleted file mode 100644 index 5ee36ac..0000000 --- a/Tests/Editor.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c7268273c19288b44a2ac493c8db07cd -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: