diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/GameApp.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/GameApp.cs
index f6877d2f..df4954be 100644
--- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/GameApp.cs
+++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/GameApp.cs
@@ -1,6 +1,9 @@
using System.Collections.Generic;
using System.Reflection;
using GameLogic;
+#if ENABLE_OBFUZ
+using Obfuz;
+#endif
using TEngine;
#pragma warning disable CS0436
@@ -8,6 +11,9 @@ using TEngine;
///
/// 游戏App。
///
+#if ENABLE_OBFUZ
+[ObfuzIgnore]
+#endif
public partial class GameApp
{
private static List _hotfixAssembly;
@@ -23,12 +29,13 @@ public partial class GameApp
Log.Warning("======= 看到此条日志代表你成功运行了热更新代码 =======");
Log.Warning("======= Entrance GameApp =======");
Utility.Unity.AddDestroyListener(Release);
+ Log.Warning("======= StartGameLogic =======");
StartGameLogic();
}
private static void StartGameLogic()
{
- GameEvent.Get().ShowLoginUI();
+ // GameEvent.Get().ShowLoginUI();
GameModule.UI.ShowUIAsync();
}
diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/GameLogic.asmdef b/UnityProject/Assets/GameScripts/HotFix/GameLogic/GameLogic.asmdef
index 675be791..adc437b8 100644
--- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/GameLogic.asmdef
+++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/GameLogic.asmdef
@@ -10,7 +10,8 @@
"GUID:47f9fc774596be54ebfed7739cd70c86",
"GUID:1aa3e8589868c80499255710874679c0",
"GUID:d8b63aba1907145bea998dd612889d6b",
- "GUID:756335c0388f7114790e504ed368ae1d"
+ "GUID:756335c0388f7114790e504ed368ae1d",
+ "GUID:4140bd2e2764f1f47ab93125ecb61942"
],
"includePlatforms": [],
"excludePlatforms": [],
diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/BattleMainUI/BattleMainUI.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/BattleMainUI/BattleMainUI.cs
index 12557c87..7c19fd7d 100644
--- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/BattleMainUI/BattleMainUI.cs
+++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/BattleMainUI/BattleMainUI.cs
@@ -1,9 +1,8 @@
using UnityEngine;
-using UnityEngine.UI;
-using TEngine;
namespace GameLogic
{
+ [Obfuz.ObfuzIgnore(Obfuz.ObfuzScope.TypeName)]
[Window(UILayer.UI)]
class BattleMainUI : UIWindow
{
diff --git a/UnityProject/Assets/Obfuz/SymbolObfus/symbol-mapping.xml b/UnityProject/Assets/Obfuz/SymbolObfus/symbol-mapping.xml
index 510f5e90..7525a61b 100644
--- a/UnityProject/Assets/Obfuz/SymbolObfus/symbol-mapping.xml
+++ b/UnityProject/Assets/Obfuz/SymbolObfus/symbol-mapping.xml
@@ -7,21 +7,21 @@
-
+
-
-
+
+
-
-
+
+
-
+
@@ -34,7 +34,7 @@
-
+
@@ -42,7 +42,7 @@
-
+
@@ -140,26 +140,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -176,7 +156,6 @@
-
@@ -186,7 +165,6 @@
-
@@ -194,11 +172,8 @@
-
-
-
@@ -213,19 +188,15 @@
-
-
-
-
@@ -237,28 +208,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -349,6 +300,7 @@
+
@@ -373,6 +325,7 @@
+
@@ -409,6 +362,7 @@
+
@@ -487,6 +441,7 @@
+
@@ -516,6 +471,7 @@
+
@@ -533,6 +489,7 @@
+
@@ -666,9 +623,6 @@
-
-
-
@@ -683,7 +637,6 @@
-
@@ -753,7 +706,6 @@
-
@@ -773,19 +725,13 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -835,7 +781,7 @@
-
+
@@ -928,7 +874,7 @@
-
+
@@ -1284,6 +1230,466 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -5470,6 +5876,7 @@
+
@@ -7120,6 +7527,7 @@
+
@@ -7177,6 +7585,7 @@
+
@@ -7480,6 +7889,7 @@
+
@@ -7489,6 +7899,7 @@
+
@@ -7496,6 +7907,7 @@
+
@@ -7522,6 +7934,7 @@
+
@@ -7529,6 +7942,7 @@
+
@@ -8065,6 +8479,7 @@
+
@@ -8116,6 +8531,7 @@
+
@@ -8123,6 +8539,7 @@
+
@@ -8134,6 +8551,7 @@
+
@@ -8144,6 +8562,7 @@
+
@@ -8163,6 +8582,7 @@
+
@@ -8313,6 +8733,7 @@
+
@@ -8322,6 +8743,7 @@
+
@@ -8333,6 +8755,7 @@
+
@@ -8347,6 +8770,7 @@
+
@@ -8363,6 +8787,7 @@
+
@@ -8378,6 +8803,7 @@
+
@@ -8393,6 +8819,7 @@
+
@@ -8401,6 +8828,7 @@
+
@@ -8546,6 +8974,7 @@
+
@@ -8560,6 +8989,7 @@
+
@@ -8570,6 +9000,7 @@
+
@@ -8708,6 +9139,7 @@
+
@@ -8715,6 +9147,7 @@
+
@@ -8722,6 +9155,7 @@
+
@@ -8912,6 +9346,7 @@
+
@@ -9006,6 +9441,7 @@
+
@@ -9015,6 +9451,7 @@
+
@@ -9024,6 +9461,7 @@
+
@@ -9031,6 +9469,7 @@
+
@@ -9372,18 +9811,21 @@
+
+
+
\ No newline at end of file
diff --git a/UnityProject/Packages/com.code-philosophy.hybridclr/Data~/hybridclr_version.json b/UnityProject/Packages/com.code-philosophy.hybridclr/Data~/hybridclr_version.json
index afda70ec..93672f79 100644
--- a/UnityProject/Packages/com.code-philosophy.hybridclr/Data~/hybridclr_version.json
+++ b/UnityProject/Packages/com.code-philosophy.hybridclr/Data~/hybridclr_version.json
@@ -2,37 +2,37 @@
"versions": [
{
"unity_version":"2019",
- "hybridclr" : { "branch":"v8.3.0"},
+ "hybridclr" : { "branch":"v8.4.0"},
"il2cpp_plus": { "branch":"v2019-8.1.0"}
},
{
"unity_version":"2020",
- "hybridclr" : { "branch":"v8.3.0"},
+ "hybridclr" : { "branch":"v8.4.0"},
"il2cpp_plus": { "branch":"v2020-8.1.0"}
},
{
"unity_version":"2021",
- "hybridclr" : { "branch":"v8.3.0"},
+ "hybridclr" : { "branch":"v8.4.0"},
"il2cpp_plus": { "branch":"v2021-8.1.0"}
},
{
"unity_version":"2022",
- "hybridclr" : { "branch":"v8.3.0"},
+ "hybridclr" : { "branch":"v8.4.0"},
"il2cpp_plus": { "branch":"v2022-8.2.0"}
},
{
"unity_version":"2022-tuanjie",
- "hybridclr" : { "branch":"v8.3.0"},
+ "hybridclr" : { "branch":"v8.4.0"},
"il2cpp_plus": { "branch":"v2022-tuanjie-8.3.0"}
},
{
"unity_version":"2023",
- "hybridclr" : { "branch":"v8.3.0"},
+ "hybridclr" : { "branch":"v8.4.0"},
"il2cpp_plus": { "branch":"v2023-8.1.0"}
},
{
"unity_version":"6000",
- "hybridclr" : { "branch":"v8.3.0"},
+ "hybridclr" : { "branch":"v8.4.0"},
"il2cpp_plus": { "branch":"v6000-8.1.0"}
}
]
diff --git a/UnityProject/Packages/com.code-philosophy.hybridclr/Editor/Commands/StripAOTDllCommand.cs b/UnityProject/Packages/com.code-philosophy.hybridclr/Editor/Commands/StripAOTDllCommand.cs
index 8e6560a9..09a6f73a 100644
--- a/UnityProject/Packages/com.code-philosophy.hybridclr/Editor/Commands/StripAOTDllCommand.cs
+++ b/UnityProject/Packages/com.code-philosophy.hybridclr/Editor/Commands/StripAOTDllCommand.cs
@@ -136,8 +136,8 @@ namespace HybridCLR.Editor.Commands
options = buildOptions,
target = target,
targetGroup = BuildPipeline.GetBuildTargetGroup(target),
-#if UNITY_2021_1_OR_NEWER
- subtarget = (int)EditorUserBuildSettings.standaloneBuildSubtarget,
+#if UNITY_SERVER
+ subtarget = (int)StandaloneBuildSubtarget.Server,
#endif
};
diff --git a/UnityProject/Packages/com.code-philosophy.hybridclr/RELEASELOG.md b/UnityProject/Packages/com.code-philosophy.hybridclr/RELEASELOG.md
index 372cb43f..8cf8136f 100644
--- a/UnityProject/Packages/com.code-philosophy.hybridclr/RELEASELOG.md
+++ b/UnityProject/Packages/com.code-philosophy.hybridclr/RELEASELOG.md
@@ -1,5 +1,20 @@
# ReleaseLog
+## 8.4.0
+
+Release Date: 2025-07-26.
+
+### Runtime
+
+- **[new] IMPORTANT! support custom image format**
+- [change] the type of field `offset` of ldsfld, stfld, ldthreadlocalfld、stthreadlocalfld changed from uint16_t to uint32_t so that supports class with huge static fields.
+- [opt] optimize to use NewValueTypeVar_Ctor_0 for new zero-argument value type and System.Activator.CreateInstance<T>()
+- [opt] optimize new ValueType with zero arguments.
+
+### Editor
+
+- [fix] fix the issue that `Texture Compression` option in Build Settings was changed after running `HybridCLR/Generate/All` on Android platform
+
## 8.3.0
Release Date: 2025-07-04.
diff --git a/UnityProject/Packages/com.code-philosophy.hybridclr/Runtime/LoadImageErrorCode.cs b/UnityProject/Packages/com.code-philosophy.hybridclr/Runtime/LoadImageErrorCode.cs
index 93d4b386..d3278101 100644
--- a/UnityProject/Packages/com.code-philosophy.hybridclr/Runtime/LoadImageErrorCode.cs
+++ b/UnityProject/Packages/com.code-philosophy.hybridclr/Runtime/LoadImageErrorCode.cs
@@ -11,6 +11,9 @@ namespace HybridCLR
HOMOLOGOUS_ASSEMBLY_HAS_LOADED, // can not load supplementary metadata assembly for the same assembly
INVALID_HOMOLOGOUS_MODE, // invalid homologous image mode
PDB_BAD_FILE, // invalid pdb file
+ UNKNOWN_IMAGE_FORMAT,
+ UNSUPPORT_FORMAT_VERSION,
+ UNMATCH_FORMAT_VARIANT,
};
}
diff --git a/UnityProject/Packages/com.code-philosophy.hybridclr/package.json b/UnityProject/Packages/com.code-philosophy.hybridclr/package.json
index 47508adf..196808c7 100644
--- a/UnityProject/Packages/com.code-philosophy.hybridclr/package.json
+++ b/UnityProject/Packages/com.code-philosophy.hybridclr/package.json
@@ -1,6 +1,6 @@
{
"name": "com.code-philosophy.hybridclr",
- "version": "8.3.0",
+ "version": "8.4.0",
"displayName": "HybridCLR",
"description": "HybridCLR is a fully featured, zero-cost, high-performance, low-memory solution for Unity's all-platform native c# hotupdate.",
"category": "Scripting",
diff --git a/UnityProject/Packages/com.code-philosophy.obfuz/Editor.meta b/UnityProject/Packages/com.code-philosophy.obfuz/Editor.meta
deleted file mode 100644
index e4fe3a4d..00000000
--- a/UnityProject/Packages/com.code-philosophy.obfuz/Editor.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 2326b426d539e084dbddf7f7c23ed1bd
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/UnityProject/Packages/com.code-philosophy.obfuz/Editor/Conf.meta b/UnityProject/Packages/com.code-philosophy.obfuz/Editor/Conf.meta
deleted file mode 100644
index d42ac4f6..00000000
--- a/UnityProject/Packages/com.code-philosophy.obfuz/Editor/Conf.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 241df8eaf3a34dc47a0873c37ddb2695
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/UnityProject/Packages/com.code-philosophy.obfuz/Editor/Conf/XmlAssemblyTypeMethodRuleParser.cs b/UnityProject/Packages/com.code-philosophy.obfuz/Editor/Conf/XmlAssemblyTypeMethodRuleParser.cs
deleted file mode 100644
index 8b349974..00000000
--- a/UnityProject/Packages/com.code-philosophy.obfuz/Editor/Conf/XmlAssemblyTypeMethodRuleParser.cs
+++ /dev/null
@@ -1,263 +0,0 @@
-using dnlib.DotNet;
-using Obfuz.Utils;
-using System;
-using System.Collections.Generic;
-using System.Xml;
-using UnityEngine;
-
-namespace Obfuz.Conf
-{
- public interface IRule
- {
- void InheritParent(T parentRule);
- }
-
-
- public interface IMethodRule where R : IRule
- {
- string Name { get; set; }
- NameMatcher NameMatcher { get; set; }
-
- R Rule { get; set; }
- }
-
- public abstract class MethodRuleBase : IMethodRule where R : IRule
- {
- public string Name { get; set; }
- public NameMatcher NameMatcher { get; set; }
-
- public R Rule { get; set; }
- }
-
- public interface ITypeRule where T : IMethodRule where R : IRule
- {
- string Name { get; set; }
-
- NameMatcher NameMatcher { get; set; }
-
- R Rule { get; set; }
-
- List Methods { get; set; }
- }
-
- public abstract class TypeRuleBase : ITypeRule where T : IMethodRule where R : IRule
- {
- public string Name { get; set; }
-
- public NameMatcher NameMatcher { get; set; }
-
- public R Rule { get; set; }
-
- public List Methods { get; set; }
- }
-
- public interface IAssemblyRule where TType : ITypeRule where TMethod : IMethodRule where TRule : IRule
- {
- string Name { get; set; }
-
- TRule Rule { get; set; }
-
- List Types { get; set; }
- }
- public abstract class AssemblyRuleBase : IAssemblyRule where TType : ITypeRule where TMethod : IMethodRule where TRule : IRule
- {
- public string Name { get; set; }
-
- public TRule Rule { get; set; }
-
- public List Types { get; set; }
- }
-
- public class XmlAssemblyTypeMethodRuleParser
- where TMethod : IMethodRule, new()
- where TType : ITypeRule, new()
- where TAssembly : IAssemblyRule, new()
- where TRule : IRule, new()
- {
- private readonly HashSet _toObfuscatedAssemblyNames;
- private readonly Func _ruleParser;
- private readonly Action _unknownNodeTypeHandler;
- private readonly Dictionary _assemblySpecs = new Dictionary();
-
- public XmlAssemblyTypeMethodRuleParser(IEnumerable toObfuscatedAssemblyNames, Func ruleParser, Action unknownNodeTypeHandler)
- {
- _toObfuscatedAssemblyNames = new HashSet(toObfuscatedAssemblyNames);
- _ruleParser = ruleParser;
- _unknownNodeTypeHandler = unknownNodeTypeHandler;
- }
-
- public Dictionary AssemblySpecs => _assemblySpecs;
-
- public void LoadConfigs(IEnumerable configFiles)
- {
- foreach (var configFile in configFiles)
- {
- LoadConfig(configFile);
- }
- }
-
- public void LoadConfig(string configFile)
- {
- if (string.IsNullOrEmpty(configFile))
- {
- throw new Exception($"Invalid xml file {configFile}, file name is empty");
- }
- Debug.Log($"ConfigurableObfuscationPolicy::LoadConfig {configFile}");
- var doc = new XmlDocument();
- doc.Load(configFile);
- var root = doc.DocumentElement;
- if (root.Name != "obfuz")
- {
- throw new Exception($"Invalid xml file {configFile}, root name should be 'obfuz'");
- }
- foreach (XmlNode node in root.ChildNodes)
- {
- if (!(node is XmlElement ele))
- {
- continue;
- }
- switch (ele.Name)
- {
- case "assembly":
- {
- TAssembly assSpec = ParseAssembly(configFile, ele);
- _assemblySpecs.Add(assSpec.Name, assSpec);
- break;
- }
- default:
- {
- if (_unknownNodeTypeHandler == null)
- {
- throw new Exception($"Invalid xml file {configFile}, unknown node {ele.Name}");
- }
- _unknownNodeTypeHandler(configFile, ele);
- break;
- }
- }
- }
- }
-
- private TAssembly ParseAssembly(string configFile, XmlElement ele)
- {
- var assemblySpec = new TAssembly();
- string name = ele.GetAttribute("name");
- if (!_toObfuscatedAssemblyNames.Contains(name))
- {
- throw new Exception($"Invalid xml file {configFile}, assembly name {name} isn't in toObfuscatedAssemblyNames");
- }
- if (_assemblySpecs.ContainsKey(name))
- {
- throw new Exception($"Invalid xml file {configFile}, assembly name {name} is duplicated");
- }
- assemblySpec.Name = name;
- assemblySpec.Rule = _ruleParser(configFile, ele);
-
- var types = new List();
- assemblySpec.Types = types;
- foreach (XmlNode node in ele.ChildNodes)
- {
- if (!(node is XmlElement childEle))
- {
- continue;
- }
- switch (childEle.Name)
- {
- case "type":
- {
- types.Add(ParseType(configFile, childEle));
- break;
- }
- default:
- {
- throw new Exception($"Invalid xml file, unknown node {childEle.Name}");
- }
- }
- }
- return assemblySpec;
- }
-
- private TType ParseType(string configFile, XmlElement element)
- {
- var typeSpec = new TType();
-
- string name = element.GetAttribute("name");
- typeSpec.Name = name;
- typeSpec.NameMatcher = new NameMatcher(name);
- typeSpec.Rule = _ruleParser(configFile, element);
-
- var methods = new List();
- typeSpec.Methods = methods;
- foreach (XmlNode node in element.ChildNodes)
- {
- if (!(node is XmlElement ele))
- {
- continue;
- }
- switch (ele.Name)
- {
- case "method":
- {
- methods.Add(ParseMethod(configFile, ele));
- break;
- }
- default:
- {
- throw new Exception($"Invalid xml file, unknown node {ele.Name}");
- }
- }
- }
- return typeSpec;
- }
-
- private TMethod ParseMethod(string configFile, XmlElement element)
- {
- var methodSpec = new TMethod();
- string name = element.GetAttribute("name");
- methodSpec.Name = name;
- methodSpec.NameMatcher = new NameMatcher(name);
- methodSpec.Rule = _ruleParser(configFile, element);
- return methodSpec;
- }
-
- public TRule GetMethodRule(MethodDef method, TRule defaultRule)
- {
- var assemblyName = method.DeclaringType.Module.Assembly.Name;
- if (!_assemblySpecs.TryGetValue(assemblyName, out var assSpec))
- {
- return defaultRule;
- }
- string declaringTypeName = method.DeclaringType.FullName;
- foreach (var typeSpec in assSpec.Types)
- {
- if (typeSpec.NameMatcher.IsMatch(declaringTypeName))
- {
- foreach (var methodSpec in typeSpec.Methods)
- {
- if (methodSpec.NameMatcher.IsMatch(method.Name))
- {
- return methodSpec.Rule;
- }
- }
- return typeSpec.Rule;
- }
- }
- return assSpec.Rule;
- }
-
- public void InheritParentRules(TRule defaultRule)
- {
- foreach (TAssembly assSpec in _assemblySpecs.Values)
- {
- assSpec.Rule.InheritParent(defaultRule);
- foreach (TType typeSpec in assSpec.Types)
- {
- typeSpec.Rule.InheritParent(assSpec.Rule);
- foreach (TMethod methodSpec in typeSpec.Methods)
- {
- methodSpec.Rule.InheritParent(typeSpec.Rule);
- }
- }
- }
- }
- }
-}
diff --git a/UnityProject/Packages/com.code-philosophy.obfuz/Editor/Conf/XmlAssemblyTypeMethodRuleParser.cs.meta b/UnityProject/Packages/com.code-philosophy.obfuz/Editor/Conf/XmlAssemblyTypeMethodRuleParser.cs.meta
deleted file mode 100644
index 84f5aa9b..00000000
--- a/UnityProject/Packages/com.code-philosophy.obfuz/Editor/Conf/XmlAssemblyTypeMethodRuleParser.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 36a3e142db81f6d4bb54938525e31973
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/UnityProject/Packages/com.code-philosophy.obfuz/Editor/Conf/XmlFieldRuleParser.cs b/UnityProject/Packages/com.code-philosophy.obfuz/Editor/Conf/XmlFieldRuleParser.cs
deleted file mode 100644
index 5cef8c98..00000000
--- a/UnityProject/Packages/com.code-philosophy.obfuz/Editor/Conf/XmlFieldRuleParser.cs
+++ /dev/null
@@ -1,203 +0,0 @@
-using dnlib.DotNet;
-using Obfuz.Utils;
-using System;
-using System.Collections.Generic;
-using System.Xml;
-
-namespace Obfuz.Conf
-{
-
-
-
- public class XmlFieldRuleParser where R : class, new()
- {
- private readonly HashSet _toObfuscatedAssemblyNames;
- private readonly Func _ruleParser;
- private readonly Action _unknownNodeTypeHandler;
- private readonly Dictionary _assemblySpecs = new Dictionary();
-
-
- private class FieldSpec
- {
- public string Name { get; set; }
- public NameMatcher NameMatcher { get; set; }
-
- public R Rule { get; set; }
- }
-
- private class TypeSpec
- {
- public string Name { get; set; }
-
- public NameMatcher NameMatcher { get; set; }
-
- public List Fields { get; set; }
- }
-
- private class AssemblySpec
- {
- public string Name { get; set; }
-
- public List Types { get; set; }
- }
-
- public XmlFieldRuleParser(IEnumerable toObfuscatedAssemblyNames, Func ruleParser, Action unknownNodeTypeHandler)
- {
- _toObfuscatedAssemblyNames = new HashSet(toObfuscatedAssemblyNames);
- _ruleParser = ruleParser;
- _unknownNodeTypeHandler = unknownNodeTypeHandler;
- }
-
- public void LoadConfigs(IEnumerable configFiles)
- {
- foreach (var configFile in configFiles)
- {
- LoadConfig(configFile);
- }
- }
-
- public void LoadConfig(string configFile)
- {
- if (string.IsNullOrEmpty(configFile))
- {
- throw new Exception($"Invalid xml file {configFile}, file name is empty");
- }
- var doc = new XmlDocument();
- doc.Load(configFile);
- var root = doc.DocumentElement;
- if (root.Name != "obfuz")
- {
- throw new Exception($"Invalid xml file {configFile}, root name should be 'obfuz'");
- }
- foreach (XmlNode node in root.ChildNodes)
- {
- if (!(node is XmlElement ele))
- {
- continue;
- }
- switch (ele.Name)
- {
- case "assembly":
- {
- AssemblySpec assSpec = ParseAssembly(configFile, ele);
- _assemblySpecs.Add(assSpec.Name, assSpec);
- break;
- }
- default:
- {
- if (_unknownNodeTypeHandler == null)
- {
- throw new Exception($"Invalid xml file {configFile}, unknown node {ele.Name}");
- }
- _unknownNodeTypeHandler(configFile, ele);
- break;
- }
- }
- }
- }
-
- private AssemblySpec ParseAssembly(string configFile, XmlElement ele)
- {
- var assemblySpec = new AssemblySpec();
- string name = ele.GetAttribute("name");
- if (!_toObfuscatedAssemblyNames.Contains(name))
- {
- throw new Exception($"Invalid xml file {configFile}, assembly name {name} isn't in toObfuscatedAssemblyNames");
- }
- if (_assemblySpecs.ContainsKey(name))
- {
- throw new Exception($"Invalid xml file {configFile}, assembly name {name} is duplicated");
- }
- assemblySpec.Name = name;
-
- var types = new List();
- assemblySpec.Types = types;
- foreach (XmlNode node in ele.ChildNodes)
- {
- if (!(node is XmlElement childEle))
- {
- continue;
- }
- switch (childEle.Name)
- {
- case "type":
- {
- types.Add(ParseType(configFile, childEle));
- break;
- }
- default:
- {
- throw new Exception($"Invalid xml file, unknown node {childEle.Name}");
- }
- }
- }
- return assemblySpec;
- }
-
- private TypeSpec ParseType(string configFile, XmlElement element)
- {
- var typeSpec = new TypeSpec();
-
- string name = element.GetAttribute("name");
- typeSpec.Name = name;
- typeSpec.NameMatcher = new NameMatcher(name);
-
- var fields = new List();
- typeSpec.Fields = fields;
- foreach (XmlNode node in element.ChildNodes)
- {
- if (!(node is XmlElement ele))
- {
- continue;
- }
- switch (ele.Name)
- {
- case "field":
- {
- fields.Add(ParseField(configFile, ele));
- break;
- }
- default:
- {
- throw new Exception($"Invalid xml file, unknown node {ele.Name}");
- }
- }
- }
- return typeSpec;
- }
-
- private FieldSpec ParseField(string configFile, XmlElement element)
- {
- var fieldSpec = new FieldSpec();
- string name = element.GetAttribute("name");
- fieldSpec.Name = name;
- fieldSpec.NameMatcher = new NameMatcher(name);
- fieldSpec.Rule = _ruleParser(configFile, element);
- return fieldSpec;
- }
-
- public R GetFieldRule(FieldDef field)
- {
- var assemblyName = field.DeclaringType.Module.Assembly.Name;
- if (!_assemblySpecs.TryGetValue(assemblyName, out var assSpec))
- {
- return null;
- }
- string declaringTypeName = field.DeclaringType.FullName;
- foreach (var typeSpec in assSpec.Types)
- {
- if (typeSpec.NameMatcher.IsMatch(declaringTypeName))
- {
- foreach (var fieldSpec in typeSpec.Fields)
- {
- if (fieldSpec.NameMatcher.IsMatch(field.Name))
- {
- return fieldSpec.Rule;
- }
- }
- }
- }
- return null;
- }
- }
-}
diff --git a/UnityProject/Packages/com.code-philosophy.obfuz/Editor/Conf/XmlFieldRuleParser.cs.meta b/UnityProject/Packages/com.code-philosophy.obfuz/Editor/Conf/XmlFieldRuleParser.cs.meta
deleted file mode 100644
index d8995b9e..00000000
--- a/UnityProject/Packages/com.code-philosophy.obfuz/Editor/Conf/XmlFieldRuleParser.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 1578270b9b81e1e4dba84d562c91090f
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/UnityProject/Packages/com.code-philosophy.obfuz/Editor/ConfigurablePassPolicy.cs b/UnityProject/Packages/com.code-philosophy.obfuz/Editor/ConfigurablePassPolicy.cs
deleted file mode 100644
index 3a94a919..00000000
--- a/UnityProject/Packages/com.code-philosophy.obfuz/Editor/ConfigurablePassPolicy.cs
+++ /dev/null
@@ -1,544 +0,0 @@
-using dnlib.DotNet;
-using Obfuz.ObfusPasses;
-using Obfuz.Utils;
-using System;
-using System.Collections.Generic;
-using System.Xml;
-using UnityEngine;
-
-namespace Obfuz
-{
- public class ConfigurablePassPolicy
- {
- class PassRule
- {
- public ObfuscationPassType? enablePasses;
- public ObfuscationPassType? disablePasses;
- public ObfuscationPassType? addPasses;
- public ObfuscationPassType? removePasses;
- public ObfuscationPassType finalPasses;
-
- public void InheritParent(PassRule parentRule, ObfuscationPassType globalEnabledPasses)
- {
- finalPasses = parentRule.finalPasses;
- if (enablePasses != null)
- {
- finalPasses = enablePasses.Value;
- }
- if (disablePasses != null)
- {
- finalPasses = ~disablePasses.Value;
- }
- if (addPasses != null)
- {
- finalPasses |= addPasses.Value;
- }
- if (removePasses != null)
- {
- finalPasses &= ~removePasses.Value;
- }
- finalPasses &= globalEnabledPasses;
- }
- }
-
- class SpecBase
- {
- public string name;
- public NameMatcher nameMatcher;
- public PassRule rule;
- }
-
- class MethodSpec : SpecBase
- {
- }
-
- class FieldSpec : SpecBase
- {
- }
-
- class PropertySpec : SpecBase
- {
- }
-
- class EventSpec : SpecBase
- {
- }
-
- class TypeSpec : SpecBase
- {
- public List fields = new List();
- public List methods = new List();
- public List properties = new List();
- public List events = new List();
- }
-
- class AssemblySpec
- {
- public string name;
- public NameMatcher nameMatcher;
- public PassRule rule;
- public List types = new List();
- }
-
- private readonly ObfuscationPassType _enabledPasses;
- private readonly HashSet _toObfuscatedAssemblyNames;
- private readonly List _assemblySpecs = new List();
- private readonly PassRule _defaultPassRule;
-
- private string _curLoadingConfig;
-
- public ConfigurablePassPolicy(IEnumerable toObfuscatedAssemblyNames, ObfuscationPassType enabledPasses, List configFiles)
- {
- _toObfuscatedAssemblyNames = new HashSet(toObfuscatedAssemblyNames);
- _enabledPasses = enabledPasses;
- _defaultPassRule = new PassRule { finalPasses = enabledPasses };
- LoadConfigs(configFiles);
- InheritParentRules(enabledPasses);
- }
-
- private void LoadConfigs(IEnumerable configFiles)
- {
- foreach (var configFile in configFiles)
- {
- LoadConfig(configFile);
- }
- }
-
- private void InheritParentRules(ObfuscationPassType enablePasses)
- {
- var defaultRule = new PassRule
- {
- enablePasses = enablePasses,
- finalPasses = enablePasses,
- };
- foreach (AssemblySpec assSpec in _assemblySpecs)
- {
- assSpec.rule.InheritParent(defaultRule, enablePasses);
- foreach (TypeSpec typeSpec in assSpec.types)
- {
- typeSpec.rule.InheritParent(assSpec.rule, enablePasses);
- foreach (FieldSpec fieldSpec in typeSpec.fields)
- {
- fieldSpec.rule.InheritParent(typeSpec.rule, enablePasses);
- }
- foreach (MethodSpec methodSpec in typeSpec.methods)
- {
- methodSpec.rule.InheritParent(typeSpec.rule, enablePasses);
- }
- foreach (PropertySpec propertySpec in typeSpec.properties)
- {
- propertySpec.rule.InheritParent(typeSpec.rule, enablePasses);
- }
- foreach (EventSpec eventSpec in typeSpec.events)
- {
- eventSpec.rule.InheritParent(typeSpec.rule, enablePasses);
- }
- }
- }
- }
-
- public void LoadConfig(string configFile)
- {
- if (string.IsNullOrEmpty(configFile))
- {
- throw new Exception($"Invalid xml file {configFile}, file name is empty");
- }
- _curLoadingConfig = configFile;
-
- Debug.Log($"ConfigurablePassPolicy::LoadConfig {configFile}");
- var doc = new XmlDocument();
- doc.Load(configFile);
- var root = doc.DocumentElement;
- if (root.Name != "obfuz")
- {
- throw new Exception($"Invalid xml file {configFile}, root name should be 'obfuz'");
- }
- foreach (XmlNode node in root.ChildNodes)
- {
- if (!(node is XmlElement ele))
- {
- continue;
- }
- switch (ele.Name)
- {
- case "assembly":
- {
- AssemblySpec assSpec = ParseAssembly(ele);
- _assemblySpecs.Add(assSpec);
- break;
- }
- default:
- {
- throw new Exception($"Invalid xml file {configFile}, unknown node {ele.Name}");
- }
- }
- }
- }
-
- (bool, ObfuscationPassType) ParseObfuscationType(string obfuscationPassTypesStr)
- {
- bool delta = false;
- if (obfuscationPassTypesStr[0] == '+' || obfuscationPassTypesStr[0] == '-')
- {
- delta = true;
- obfuscationPassTypesStr = obfuscationPassTypesStr.Substring(1);
- }
- ObfuscationPassType passType = ObfuscationPassType.None;
- foreach (var passName in obfuscationPassTypesStr.Split('|'))
- {
- if (Enum.TryParse(passName, out var pass))
- {
- passType |= pass;
- }
- else
- {
- throw new Exception($"Invalid xml file {_curLoadingConfig}, unknown pass type {passName}");
- }
- }
- return (delta, passType);
- }
-
- private PassRule ParseRule(XmlElement ele)
- {
- var r = new PassRule();
- if (ele.HasAttribute("enable"))
- {
- string enablePassStr = ele.GetAttribute("enable");
- if (string.IsNullOrEmpty(enablePassStr))
- {
- throw new Exception($"Invalid xml file {_curLoadingConfig}, enable attribute is empty");
- }
- var (delta, passType) = ParseObfuscationType(enablePassStr);
- if (delta)
- {
- r.addPasses = passType;
- }
- else
- {
- r.enablePasses = passType;
- }
- }
- if (ele.HasAttribute("disable"))
- {
- string disablePassStr = ele.GetAttribute("disable");
- if (string.IsNullOrEmpty(disablePassStr))
- {
- throw new Exception($"Invalid xml file {_curLoadingConfig}, disable attribute is empty");
- }
- var (delta, passType) = ParseObfuscationType(disablePassStr);
- if (delta)
- {
- r.removePasses = passType;
- }
- else
- {
- r.disablePasses = passType;
- }
- }
- if (r.enablePasses != null && (r.disablePasses != null || r.addPasses != null || r.removePasses != null))
- {
- throw new Exception($"Invalid xml file {_curLoadingConfig}, enable and disable can't be used together");
- }
- if (r.disablePasses != null && (r.enablePasses != null || r.addPasses != null || r.removePasses != null))
- {
- throw new Exception($"Invalid xml file {_curLoadingConfig}, disable and enable can't be used together");
- }
- return r;
- }
-
- private AssemblySpec ParseAssembly(XmlElement ele)
- {
- var assemblySpec = new AssemblySpec();
- string name = ele.GetAttribute("name");
- if (!_toObfuscatedAssemblyNames.Contains(name))
- {
- throw new Exception($"Invalid xml file {_curLoadingConfig}, assembly name {name} isn't in toObfuscatedAssemblyNames");
- }
- assemblySpec.name = name;
- assemblySpec.nameMatcher = new NameMatcher(name);
- assemblySpec.rule = ParseRule(ele);
-
-
- var types = assemblySpec.types;
- foreach (XmlNode node in ele.ChildNodes)
- {
- if (!(node is XmlElement childEle))
- {
- continue;
- }
- switch (childEle.Name)
- {
- case "type":
- {
- types.Add(ParseType(childEle));
- break;
- }
- default:
- {
- throw new Exception($"Invalid xml file, unknown node {childEle.Name}");
- }
- }
- }
- return assemblySpec;
- }
-
- private TypeSpec ParseType(XmlElement element)
- {
- var typeSpec = new TypeSpec();
-
- string name = element.GetAttribute("name");
- typeSpec.name = name;
- typeSpec.nameMatcher = new NameMatcher(name);
- typeSpec.rule = ParseRule(element);
-
- List fields = typeSpec.fields;
- List methods = typeSpec.methods;
- List properties = typeSpec.properties;
- List events = typeSpec.events;
- foreach (XmlNode node in element.ChildNodes)
- {
- if (!(node is XmlElement ele))
- {
- continue;
- }
- switch (ele.Name)
- {
- case "field":
- {
- fields.Add(ParseField(ele));
- break;
- }
- case "method":
- {
- methods.Add(ParseMethod(ele));
- break;
- }
- case "property":
- {
- properties.Add(ParseProperty(ele));
- break;
- }
- case "event":
- {
- events.Add(ParseEvent(ele));
- break;
- }
- default:
- {
- throw new Exception($"Invalid xml file, unknown node {ele.Name}");
- }
- }
- }
- return typeSpec;
- }
-
- private void ParseSpecObject(XmlElement element, SpecBase obj)
- {
- string name = element.GetAttribute("name");
- obj.name = name;
- obj.nameMatcher = new NameMatcher(name);
- obj.rule = ParseRule(element);
- }
-
- private FieldSpec ParseField(XmlElement element)
- {
- var fieldSpec = new FieldSpec();
- ParseSpecObject(element, fieldSpec);
- return fieldSpec;
- }
-
- private MethodSpec ParseMethod(XmlElement element)
- {
- var methodSpec = new MethodSpec();
- ParseSpecObject(element, methodSpec);
- return methodSpec;
- }
-
- private PropertySpec ParseProperty(XmlElement element)
- {
- var propertySpec = new PropertySpec();
- ParseSpecObject(element, propertySpec);
- return propertySpec;
- }
-
- private EventSpec ParseEvent(XmlElement element)
- {
- var eventSpec = new EventSpec();
- ParseSpecObject(element, eventSpec);
- return eventSpec;
- }
-
- private readonly Dictionary _modulePassRuleCaches = new Dictionary();
- private readonly Dictionary _typePassRuleCaches = new Dictionary();
- private readonly Dictionary _methodPassRuleCaches = new Dictionary();
- private readonly Dictionary _fieldPassRuleCaches = new Dictionary();
- private readonly Dictionary _propertyPassRuleCaches = new Dictionary();
- private readonly Dictionary _eventPassRuleCaches = new Dictionary();
-
-
- private (AssemblySpec, PassRule) GetAssemblySpec(ModuleDef module)
- {
- if (!_modulePassRuleCaches.TryGetValue(module, out var result))
- {
- result = (null, _defaultPassRule);
- string assName = module.Assembly.Name;
- foreach (var ass in _assemblySpecs)
- {
- if (ass.nameMatcher.IsMatch(assName))
- {
- result = (ass, ass.rule);
- break;
- }
- }
- _modulePassRuleCaches.Add(module, result);
- }
- return result;
- }
-
- private (TypeSpec, PassRule) GetTypeSpec(TypeDef type)
- {
- if (!_typePassRuleCaches.TryGetValue(type, out var result))
- {
- var assResult = GetAssemblySpec(type.Module);
- result = (null, assResult.Item2);
- if (assResult.Item1 != null)
- {
- string typeName = type.FullName;
- foreach (var typeSpec in assResult.Item1.types)
- {
- if (typeSpec.nameMatcher.IsMatch(typeName))
- {
- result = (typeSpec, typeSpec.rule);
- break;
- }
- }
- }
- _typePassRuleCaches.Add(type, result);
- }
- return result;
- }
-
- private (MethodSpec, PassRule) GetMethodSpec(MethodDef method)
- {
- if (!_methodPassRuleCaches.TryGetValue(method, out var result))
- {
- var typeResult = GetTypeSpec(method.DeclaringType);
- result = (null, typeResult.Item2);
- if (typeResult.Item1 != null)
- {
- string methodName = method.Name;
- foreach (var methodSpec in typeResult.Item1.methods)
- {
- if (methodSpec.nameMatcher.IsMatch(methodName))
- {
- result = (methodSpec, methodSpec.rule);
- break;
- }
- }
- }
- _methodPassRuleCaches.Add(method, result);
- }
- return result;
- }
-
- private (FieldSpec, PassRule) GetFieldSpec(FieldDef field)
- {
- if (!_fieldPassRuleCaches.TryGetValue(field, out var result))
- {
- var typeResult = GetTypeSpec(field.DeclaringType);
- result = (null, typeResult.Item2);
- if (typeResult.Item1 != null)
- {
- string fieldName = field.Name;
- foreach (var fieldSpec in typeResult.Item1.fields)
- {
- if (fieldSpec.nameMatcher.IsMatch(fieldName))
- {
- result = (fieldSpec, fieldSpec.rule);
- break;
- }
- }
- }
- _fieldPassRuleCaches.Add(field, result);
- }
- return result;
- }
-
- private (PropertySpec, PassRule) GetPropertySpec(PropertyDef property)
- {
- if (!_propertyPassRuleCaches.TryGetValue(property, out var result))
- {
- var typeResult = GetTypeSpec(property.DeclaringType);
- result = (null, typeResult.Item2);
- if (typeResult.Item1 != null)
- {
- string propertyName = property.Name;
- foreach (var propertySpec in typeResult.Item1.properties)
- {
- if (propertySpec.nameMatcher.IsMatch(propertyName))
- {
- result = (propertySpec, propertySpec.rule);
- break;
- }
- }
- }
- _propertyPassRuleCaches.Add(property, result);
- }
- return result;
- }
-
- private (EventSpec, PassRule) GetEventSpec(EventDef eventDef)
- {
- if (!_eventPassRuleCaches.TryGetValue(eventDef, out var result))
- {
- var typeResult = GetTypeSpec(eventDef.DeclaringType);
- result = (null, typeResult.Item2);
- if (typeResult.Item1 != null)
- {
- string eventName = eventDef.Name;
- foreach (var eventSpec in typeResult.Item1.events)
- {
- if (eventSpec.nameMatcher.IsMatch(eventName))
- {
- result = (eventSpec, eventSpec.rule);
- break;
- }
- }
- }
- _eventPassRuleCaches.Add(eventDef, result);
- }
- return result;
- }
-
-
- public ObfuscationPassType GetAssemblyObfuscationPasses(ModuleDef module)
- {
- return GetAssemblySpec(module).Item2.finalPasses;
- }
-
- public ObfuscationPassType GetTypeObfuscationPasses(TypeDef type)
- {
- return GetTypeSpec(type).Item2.finalPasses;
- }
-
- public ObfuscationPassType GetMethodObfuscationPasses(MethodDef method)
- {
- return GetMethodSpec(method).Item2.finalPasses;
- }
-
- public ObfuscationPassType GetFieldObfuscationPasses(FieldDef field)
- {
- return GetFieldSpec(field).Item2.finalPasses;
- }
-
- public ObfuscationPassType GetPropertyObfuscationPasses(PropertyDef property)
- {
- return GetPropertySpec(property).Item2.finalPasses;
- }
-
- public ObfuscationPassType GetEventObfuscationPasses(EventDef eventDef)
- {
- return GetEventSpec(eventDef).Item2.finalPasses;
- }
- }
-}
diff --git a/UnityProject/Packages/com.code-philosophy.obfuz/Editor/ConfigurablePassPolicy.cs.meta b/UnityProject/Packages/com.code-philosophy.obfuz/Editor/ConfigurablePassPolicy.cs.meta
deleted file mode 100644
index 9b85183e..00000000
--- a/UnityProject/Packages/com.code-philosophy.obfuz/Editor/ConfigurablePassPolicy.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 41044699810a34f4780e14de084bf7d7
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/UnityProject/Packages/com.code-philosophy.obfuz/Editor/ConstValues.cs b/UnityProject/Packages/com.code-philosophy.obfuz/Editor/ConstValues.cs
deleted file mode 100644
index 90c3a3bd..00000000
--- a/UnityProject/Packages/com.code-philosophy.obfuz/Editor/ConstValues.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using System.Text;
-
-namespace Obfuz.Editor
-{
- public static class ConstValues
- {
- public const string ObfuzInternalSymbolNamePrefix = "$Obfuz$";
-
- public const string ObfuzRuntimeAssemblyName = "Obfuz.Runtime";
-
- public const string ObfuzIgnoreAttributeFullName = "Obfuz.ObfuzIgnoreAttribute";
-
- public const string ObfuzScopeFullName = "Obfuz.ObfuzScope";
-
- public const string EncryptFieldAttributeFullName = "Obfuz.EncryptFieldAttribute";
- public const string GeneratedEncryptionVirtualMachineFullName = "Obfuz.EncryptionVM.GeneratedEncryptionVirtualMachine";
-
- public const string EmbeddedAttributeFullName = "Microsoft.CodeAnalysis.EmbeddedAttribute";
-
- public const string MonoPInvokeCallbackAttributeName = "MonoPInvokeCallbackAttribute";
-
- public const string ZluaLuaInvokeAttributeFullName = "Zlua.LuaInvokeAttribute";
- public const string ZluaLuaCallbackAttributeFullName = "Zlua.LuaCallbackAttribute";
- public const string ZluaLuaMarshalAsAttributeFullName = "Zlua.LuaMarshalAsAttribute";
-
- public const string BurstCompileFullName = "Unity.Burst.BurstCompileAttribute";
- public const string DOTSCompilerGeneratedAttributeFullName = "Unity.Jobs.DOTSCompilerGeneratedAttribute";
-
- public const string RuntimeInitializedOnLoadMethodAttributeFullName = "UnityEngine.RuntimeInitializeOnLoadMethodAttribute";
- public const string BlackboardEnumAttributeFullName = "Unity.Behavior.BlackboardEnumAttribute";
-
- public const string CompilerGeneratedAttributeFullName = "System.Runtime.CompilerServices.CompilerGeneratedAttribute";
- }
-}
diff --git a/UnityProject/Packages/com.code-philosophy.obfuz/Editor/ConstValues.cs.meta b/UnityProject/Packages/com.code-philosophy.obfuz/Editor/ConstValues.cs.meta
deleted file mode 100644
index 33f41601..00000000
--- a/UnityProject/Packages/com.code-philosophy.obfuz/Editor/ConstValues.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: aee7817ed523a5e4ea42104013e8a775
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/UnityProject/Packages/com.code-philosophy.obfuz/Editor/Data.meta b/UnityProject/Packages/com.code-philosophy.obfuz/Editor/Data.meta
deleted file mode 100644
index d162ae8e..00000000
--- a/UnityProject/Packages/com.code-philosophy.obfuz/Editor/Data.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 3319ebe75a42f3d4d996846ca09ed099
-folderAsset: yes
-DefaultImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/UnityProject/Packages/com.code-philosophy.obfuz/Editor/Data/ConstFieldAllocator.cs b/UnityProject/Packages/com.code-philosophy.obfuz/Editor/Data/ConstFieldAllocator.cs
deleted file mode 100644
index 90f889d1..00000000
--- a/UnityProject/Packages/com.code-philosophy.obfuz/Editor/Data/ConstFieldAllocator.cs
+++ /dev/null
@@ -1,269 +0,0 @@
-using dnlib.DotNet;
-using dnlib.DotNet.Emit;
-using Obfuz.Editor;
-using Obfuz.Emit;
-using Obfuz.Utils;
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine.Assertions;
-
-namespace Obfuz.Data
-{
- public class ConstFieldAllocator : GroupByModuleEntityBase
- {
- private RandomCreator _randomCreator;
- private IEncryptor _encryptor;
-
- private TypeDef _holderTypeDef;
-
- class ConstFieldInfo
- {
- public FieldDef field;
- public object value;
- }
-
- class AnyComparer : IEqualityComparer