From 7ca5ec54b1c45bd54e326c0454b3e457bbc6cd06 Mon Sep 17 00:00:00 2001 From: walon Date: Sat, 19 Apr 2025 12:55:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DPlayer.Build=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=A6=82=E6=9E=9C=E5=B7=B2=E7=BB=8F=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E4=BA=86=E5=B7=A5=E7=A8=8B=EF=BC=8C=E5=88=99=E4=B8=8D=E4=BC=9A?= =?UTF-8?q?=E6=B7=B7=E6=B7=86=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Editor/BuildProcess/ObfuzProcess2021.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Editor/BuildProcess/ObfuzProcess2021.cs b/Editor/BuildProcess/ObfuzProcess2021.cs index f8075c9..8535bce 100644 --- a/Editor/BuildProcess/ObfuzProcess2021.cs +++ b/Editor/BuildProcess/ObfuzProcess2021.cs @@ -31,9 +31,10 @@ namespace Obfuz public void OnPreprocessBuild(BuildReport report) { s_obfuscated = false; + FileUtil.RemoveDir(GetScriptAssembliesPath()); } - private static string GetScriptAssembliesPath(object obj) + private static string GetScriptAssembliesPath() { #if UNITY_2021_1_OR_NEWER //object settings = obj.GetType().GetProperty("settings").GetValue(obj); @@ -53,7 +54,7 @@ namespace Obfuz } if (!s_obfuscated) { - RunObfuscate(GetScriptAssembliesPath(obj)); + RunObfuscate(GetScriptAssembliesPath()); s_obfuscated = true; } } @@ -92,7 +93,7 @@ namespace Obfuz Path.Combine(applicationContentsPath, "MonoBleedingEdge/lib/mono/4.7.1-api/Facades"), Path.Combine(applicationContentsPath, "MonoBleedingEdge/lib/mono/4.7.1-api"), #else - #error "Unsupported Unity version" +#error "Unsupported Unity version" #endif Path.Combine(applicationContentsPath, "Managed/UnityEngine"), backupPlayerScriptAssembliesPath, @@ -116,4 +117,4 @@ namespace Obfuz } } #endif - } + }