From d83df4a2a56862fbfc18b2ec5ef13dc2162b9d3d Mon Sep 17 00:00:00 2001 From: walon Date: Sat, 19 Apr 2025 12:13:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=812022?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Editor/BuildProcess/ObfuzProcess2021.cs | 10 ++++++---- Editor/BuildProcess/ObfuzProcess2022OrNewer.cs | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Editor/BuildProcess/ObfuzProcess2021.cs b/Editor/BuildProcess/ObfuzProcess2021.cs index 7445fef..f8075c9 100644 --- a/Editor/BuildProcess/ObfuzProcess2021.cs +++ b/Editor/BuildProcess/ObfuzProcess2021.cs @@ -15,7 +15,7 @@ using System.Reflection; namespace Obfuz { -#if UNITY_2019 || UNITY_2020 || UNITY_2021 +#if UNITY_2019 || UNITY_2020 || UNITY_2021 || UNITY_2022 internal class ObfuzProcess2021 : IPreprocessBuildWithReport, IPostprocessBuildWithReport { private static bool s_obfuscated = false; @@ -35,9 +35,11 @@ namespace Obfuz private static string GetScriptAssembliesPath(object obj) { -#if UNITY_2021 - object settings = obj.GetType().GetProperty("settings").GetValue(obj); - string path = (string)settings.GetType().GetProperty("OutputDirectory").GetValue(settings); +#if UNITY_2021_1_OR_NEWER + //object settings = obj.GetType().GetProperty("settings").GetValue(obj); + //string path = (string)settings.GetType().GetProperty("OutputDirectory").GetValue(settings); + //return path; + return "Library/Bee/PlayerScriptAssemblies"; #else return "Library/PlayerScriptAssemblies"; #endif diff --git a/Editor/BuildProcess/ObfuzProcess2022OrNewer.cs b/Editor/BuildProcess/ObfuzProcess2022OrNewer.cs index 6ff58f1..e99fccc 100644 --- a/Editor/BuildProcess/ObfuzProcess2022OrNewer.cs +++ b/Editor/BuildProcess/ObfuzProcess2022OrNewer.cs @@ -14,7 +14,7 @@ using UnityEditor.Compilation; namespace Obfuz { -#if UNITY_2022_1_OR_NEWER +#if DISABLE internal class ObfuzProcess2022OrNewer : IPreprocessBuildWithReport, IProcessSceneWithReport, IPostprocessBuildWithReport { private static bool s_inBuild = false;