diff --git a/com.code-philosophy.obfuz/Editor/ObfusPasses/FieldEncrypt/ConfigurableEncryptPolicy.cs b/com.code-philosophy.obfuz/Editor/ObfusPasses/FieldEncrypt/ConfigurableEncryptPolicy.cs index 20ff574..029b977 100644 --- a/com.code-philosophy.obfuz/Editor/ObfusPasses/FieldEncrypt/ConfigurableEncryptPolicy.cs +++ b/com.code-philosophy.obfuz/Editor/ObfusPasses/FieldEncrypt/ConfigurableEncryptPolicy.cs @@ -15,9 +15,11 @@ namespace Obfuz.ObfusPasses.FieldEncrypt } private readonly XmlFieldRuleParser _configParser; + private readonly ObfuzIgnoreScopeComputeCache _obfuzIgnoreScopeComputeCache; - public ConfigurableEncryptPolicy(List toObfuscatedAssemblyNames, List configFiles) + public ConfigurableEncryptPolicy(ObfuzIgnoreScopeComputeCache obfuzIgnoreScopeComputeCache, List toObfuscatedAssemblyNames, List configFiles) { + _obfuzIgnoreScopeComputeCache = obfuzIgnoreScopeComputeCache; _configParser = new XmlFieldRuleParser(toObfuscatedAssemblyNames, ParseRule, null); _configParser.LoadConfigs(configFiles); } @@ -33,7 +35,7 @@ namespace Obfuz.ObfusPasses.FieldEncrypt { return true; } - if (MetaUtil.HasSelfOrInheritObfuzIgnoreScope(field, field.DeclaringType, ObfuzScope.Field)) + if (_obfuzIgnoreScopeComputeCache.HasSelfOrInheritObfuzIgnoreScope(field, field.DeclaringType, ObfuzScope.Field)) { return false; } diff --git a/com.code-philosophy.obfuz/Editor/ObfusPasses/FieldEncrypt/FieldEncryptPass.cs b/com.code-philosophy.obfuz/Editor/ObfusPasses/FieldEncrypt/FieldEncryptPass.cs index d9d5029..3be16be 100644 --- a/com.code-philosophy.obfuz/Editor/ObfusPasses/FieldEncrypt/FieldEncryptPass.cs +++ b/com.code-philosophy.obfuz/Editor/ObfusPasses/FieldEncrypt/FieldEncryptPass.cs @@ -29,7 +29,7 @@ namespace Obfuz.ObfusPasses.FieldEncrypt { var ctx = ObfuscationPassContext.Current; _memoryEncryptor = new DefaultFieldEncryptor(ctx.encryptionScopeProvider, ctx.moduleEntityManager, _settings); - _encryptionPolicy = new ConfigurableEncryptPolicy(ctx.coreSettings.assembliesToObfuscate, _settings.ruleFiles); + _encryptionPolicy = new ConfigurableEncryptPolicy(ctx.obfuzIgnoreScopeComputeCache, ctx.coreSettings.assembliesToObfuscate, _settings.ruleFiles); } public override void Stop() diff --git a/com.code-philosophy.obfuz/Editor/ObfusPasses/SymbolObfus/Policies/SystemRenamePolicy.cs b/com.code-philosophy.obfuz/Editor/ObfusPasses/SymbolObfus/Policies/SystemRenamePolicy.cs index 4fd38fd..30e7e34 100644 --- a/com.code-philosophy.obfuz/Editor/ObfusPasses/SymbolObfus/Policies/SystemRenamePolicy.cs +++ b/com.code-philosophy.obfuz/Editor/ObfusPasses/SymbolObfus/Policies/SystemRenamePolicy.cs @@ -5,6 +5,13 @@ namespace Obfuz.ObfusPasses.SymbolObfus.Policies { public class SystemRenamePolicy : ObfuscationPolicyBase { + private readonly ObfuzIgnoreScopeComputeCache _obfuzIgnoreScopeComputeCache; + + public SystemRenamePolicy(ObfuzIgnoreScopeComputeCache obfuzIgnoreScopeComputeCache) + { + _obfuzIgnoreScopeComputeCache = obfuzIgnoreScopeComputeCache; + } + private bool IsFullIgnoreObfuscatedType(TypeDef typeDef) { return typeDef.FullName == "Obfuz.ObfuzIgnoreAttribute" || typeDef.FullName == "Obfuz.ObfuzScope" || typeDef.FullName == "Obfuz.EncryptFieldAttribute"; @@ -22,7 +29,7 @@ namespace Obfuz.ObfusPasses.SymbolObfus.Policies return false; } - if (MetaUtil.HasObfuzIgnoreScope(typeDef, ObfuzScope.TypeName) || MetaUtil.HasEnclosingObfuzIgnoreScope(typeDef.DeclaringType, ObfuzScope.TypeName)) + if (_obfuzIgnoreScopeComputeCache.HasSelfOrEnclosingObfuzIgnoreScope(typeDef, ObfuzScope.TypeName)) { return false; } @@ -40,7 +47,7 @@ namespace Obfuz.ObfusPasses.SymbolObfus.Policies return false; } - if (MetaUtil.HasSelfOrInheritPropertyOrEventOrOrTypeDefIgnoreMethodName(methodDef)) + if (_obfuzIgnoreScopeComputeCache.HasSelfOrInheritPropertyOrEventOrOrTypeDefIgnoreMethodName(methodDef)) { return false; } @@ -53,7 +60,7 @@ namespace Obfuz.ObfusPasses.SymbolObfus.Policies { return false; } - if (MetaUtil.HasSelfOrInheritObfuzIgnoreScope(fieldDef, fieldDef.DeclaringType, ObfuzScope.Field)) + if (_obfuzIgnoreScopeComputeCache.HasSelfOrInheritObfuzIgnoreScope(fieldDef, fieldDef.DeclaringType, ObfuzScope.Field)) { return false; } @@ -70,7 +77,7 @@ namespace Obfuz.ObfusPasses.SymbolObfus.Policies { return false; } - if (MetaUtil.HasSelfOrInheritObfuzIgnoreScope(propertyDef, propertyDef.DeclaringType, ObfuzScope.PropertyName)) + if (_obfuzIgnoreScopeComputeCache.HasSelfOrInheritObfuzIgnoreScope(propertyDef, propertyDef.DeclaringType, ObfuzScope.PropertyName)) { return false; } @@ -83,7 +90,7 @@ namespace Obfuz.ObfusPasses.SymbolObfus.Policies { return false; } - if (MetaUtil.HasSelfOrInheritObfuzIgnoreScope(eventDef, eventDef.DeclaringType, ObfuzScope.EventName)) + if (_obfuzIgnoreScopeComputeCache.HasSelfOrInheritObfuzIgnoreScope(eventDef, eventDef.DeclaringType, ObfuzScope.EventName)) { return false; } diff --git a/com.code-philosophy.obfuz/Editor/ObfusPasses/SymbolObfus/SymbolRename.cs b/com.code-philosophy.obfuz/Editor/ObfusPasses/SymbolObfus/SymbolRename.cs index e09ac7a..df3fa5f 100644 --- a/com.code-philosophy.obfuz/Editor/ObfusPasses/SymbolObfus/SymbolRename.cs +++ b/com.code-philosophy.obfuz/Editor/ObfusPasses/SymbolObfus/SymbolRename.cs @@ -77,7 +77,7 @@ namespace Obfuz.ObfusPasses.SymbolObfus var totalRenamePolicies = new List { new SupportPassPolicy(ctx.passPolicy), - new SystemRenamePolicy(), + new SystemRenamePolicy(ctx.obfuzIgnoreScopeComputeCache), new UnityRenamePolicy(), obfuscateRuleConfig, }; diff --git a/com.code-philosophy.obfuz/Editor/ObfuscationMethodWhitelist.cs b/com.code-philosophy.obfuz/Editor/ObfuscationMethodWhitelist.cs index 34a937e..ecdd1e7 100644 --- a/com.code-philosophy.obfuz/Editor/ObfuscationMethodWhitelist.cs +++ b/com.code-philosophy.obfuz/Editor/ObfuscationMethodWhitelist.cs @@ -12,6 +12,12 @@ namespace Obfuz { public class ObfuscationMethodWhitelist { + private readonly ObfuzIgnoreScopeComputeCache _obfuzComputeCache; + + public ObfuscationMethodWhitelist(ObfuzIgnoreScopeComputeCache obfuzComputeCache) + { + _obfuzComputeCache = obfuzComputeCache; + } public bool IsInWhiteList(ModuleDef module) { @@ -52,7 +58,7 @@ namespace Obfuz { return true; } - if (MetaUtil.HasSelfOrInheritObfuzIgnoreScope(method, typeDef, ObfuzScope.MethodBody)) + if (_obfuzComputeCache.HasSelfOrInheritObfuzIgnoreScope(method, typeDef, ObfuzScope.MethodBody)) { return true; } @@ -80,7 +86,7 @@ namespace Obfuz { return true; } - if (MetaUtil.HasSelfOrInheritObfuzIgnoreScope(type, type.DeclaringType, ObfuzScope.TypeName)) + if (_obfuzComputeCache.HasSelfOrInheritObfuzIgnoreScope(type, type.DeclaringType, ObfuzScope.TypeName)) { return true; } diff --git a/com.code-philosophy.obfuz/Editor/ObfuscationPassContext.cs b/com.code-philosophy.obfuz/Editor/ObfuscationPassContext.cs index 9367b00..2740e19 100644 --- a/com.code-philosophy.obfuz/Editor/ObfuscationPassContext.cs +++ b/com.code-philosophy.obfuz/Editor/ObfuscationPassContext.cs @@ -68,6 +68,7 @@ namespace Obfuz public AssemblyCache assemblyCache; public List modulesToObfuscate; public List allObfuscationRelativeModules; + public ObfuzIgnoreScopeComputeCache obfuzIgnoreScopeComputeCache; public EncryptionScopeProvider encryptionScopeProvider; public ConstFieldAllocator constFieldAllocator; diff --git a/com.code-philosophy.obfuz/Editor/Obfuscator.cs b/com.code-philosophy.obfuz/Editor/Obfuscator.cs index d756e38..ecb1a55 100644 --- a/com.code-philosophy.obfuz/Editor/Obfuscator.cs +++ b/com.code-philosophy.obfuz/Editor/Obfuscator.cs @@ -283,6 +283,7 @@ namespace Obfuz EncryptionScopeProvider encryptionScopeProvider = CreateEncryptionScopeProvider(); var moduleEntityManager = new GroupByModuleEntityManager(); + var obfuzIgnoreScopeComputeCache = new ObfuzIgnoreScopeComputeCache(); var rvaDataAllocator = new RvaDataAllocator(encryptionScopeProvider, moduleEntityManager); var constFieldAllocator = new ConstFieldAllocator(encryptionScopeProvider, rvaDataAllocator, moduleEntityManager); _ctx = new ObfuscationPassContext @@ -294,10 +295,11 @@ namespace Obfuz moduleEntityManager = moduleEntityManager, encryptionScopeProvider = encryptionScopeProvider, + obfuzIgnoreScopeComputeCache = obfuzIgnoreScopeComputeCache, rvaDataAllocator = rvaDataAllocator, constFieldAllocator = constFieldAllocator, - whiteList = new ObfuscationMethodWhitelist(), + whiteList = new ObfuscationMethodWhitelist(obfuzIgnoreScopeComputeCache), passPolicy = _passPolicy, }; ObfuscationPassContext.Current = _ctx; diff --git a/com.code-philosophy.obfuz/Editor/Utils/MetaUtil.cs b/com.code-philosophy.obfuz/Editor/Utils/MetaUtil.cs index 12b2f13..432ed6d 100644 --- a/com.code-philosophy.obfuz/Editor/Utils/MetaUtil.cs +++ b/com.code-philosophy.obfuz/Editor/Utils/MetaUtil.cs @@ -830,141 +830,6 @@ namespace Obfuz.Utils return result.ToString(); } - public static ObfuzScope? GetObfuzIgnoreScope(IHasCustomAttribute obj) - { - var ca = obj.CustomAttributes.FirstOrDefault(c => c.AttributeType.FullName == "Obfuz.ObfuzIgnoreAttribute"); - if (ca == null) - { - return null; - } - var scope = (ObfuzScope)ca.ConstructorArguments[0].Value; - return scope; - } - - public static bool HasObfuzIgnoreScope(IHasCustomAttribute obj, ObfuzScope targetScope) - { - ObfuzScope? objScope = GetObfuzIgnoreScope(obj); - if (objScope == null) - { - return false; - } - return objScope != null && (objScope & targetScope) != 0; - } - - public static bool HasEnclosingObfuzIgnoreScope(TypeDef typeDef, ObfuzScope targetScope) - { - TypeDef cur = typeDef; - while (cur != null) - { - var ca = cur.CustomAttributes?.FirstOrDefault(c => c.AttributeType.FullName == "Obfuz.ObfuzIgnoreAttribute"); - if (ca != null) - { - var scope = (ObfuzScope)ca.ConstructorArguments[0].Value; - CANamedArgument inheritByNestedTypesArg = ca.GetNamedArgument("ApplyToNestedTypes", false); - bool inheritByNestedTypes = inheritByNestedTypesArg == null || (bool)inheritByNestedTypesArg.Value; - return inheritByNestedTypes && (scope & targetScope) != 0; - } - cur = cur.DeclaringType; - } - return false; - } - - public static bool HasDeclaringOrEnclosingMemberObfuzIgnoreScope(TypeDef typeDef, ObfuzScope targetScope) - { - TypeDef cur = typeDef; - while (cur != null) - { - var ca = cur.CustomAttributes?.FirstOrDefault(c => c.AttributeType.FullName == "Obfuz.ObfuzIgnoreAttribute"); - if (ca != null) - { - var scope = (ObfuzScope)ca.ConstructorArguments[0].Value; - if (cur != typeDef) - { - CANamedArgument applyToNestedTypesArg = ca.GetNamedArgument("ApplyToNestedTypes", false); - if (applyToNestedTypesArg != null && !(bool)applyToNestedTypesArg.Value) - { - return false; - } - } - return (scope & targetScope) != 0; - } - cur = cur.DeclaringType; - } - return false; - } - - //public static bool HasSelfOrInheritObfuzIgnoreScope(TypeDef obj, ObfuzScope targetScope) - //{ - // ObfuzScope? scope = GetSelfOrInheritObfuzIgnoreScope(obj); - // return scope != null && (scope & targetScope) != 0; - //} - - public static bool HasSelfOrInheritObfuzIgnoreScope(IHasCustomAttribute obj, TypeDef declaringType, ObfuzScope targetScope) - { - return HasObfuzIgnoreScope(obj, targetScope) || HasDeclaringOrEnclosingMemberObfuzIgnoreScope(declaringType, targetScope); - } - - public static bool HasSelfOrInheritPropertyOrEventOrOrTypeDefObfuzIgnoreScope(MethodDef obj, ObfuzScope targetScope) - { - if (HasObfuzIgnoreScope(obj, targetScope)) - { - return true; - } - - TypeDef declaringType = obj.DeclaringType; - - foreach (var propertyDef in declaringType.Properties) - { - if (propertyDef.GetMethod == obj || propertyDef.SetMethod == obj) - { - return HasObfuzIgnoreScope(propertyDef, targetScope) || HasDeclaringOrEnclosingMemberObfuzIgnoreScope(declaringType, targetScope); - } - } - - foreach (var eventDef in declaringType.Events) - { - if (eventDef.AddMethod == obj || eventDef.RemoveMethod == obj) - { - ObfuzScope? eventScope = GetObfuzIgnoreScope(eventDef); - if (eventScope != null && (eventScope & targetScope) != 0) - { - return true; - } - return HasObfuzIgnoreScope(eventDef, targetScope) || HasDeclaringOrEnclosingMemberObfuzIgnoreScope(declaringType, targetScope); - } - } - - return HasDeclaringOrEnclosingMemberObfuzIgnoreScope(declaringType, targetScope); - } - - public static bool HasSelfOrInheritPropertyOrEventOrOrTypeDefIgnoreMethodName(MethodDef obj) - { - if (HasObfuzIgnoreScope(obj, ObfuzScope.MethodName)) - { - return true; - } - - TypeDef declaringType = obj.DeclaringType; - - foreach (var propertyDef in declaringType.Properties) - { - if (propertyDef.GetMethod == obj || propertyDef.SetMethod == obj) - { - return HasSelfOrInheritObfuzIgnoreScope(propertyDef, declaringType, ObfuzScope.PropertyGetterSetterName | ObfuzScope.MethodName); - } - } - - foreach (var eventDef in declaringType.Events) - { - if (eventDef.AddMethod == obj || eventDef.RemoveMethod == obj) - { - return HasSelfOrInheritObfuzIgnoreScope(eventDef, declaringType, ObfuzScope.EventAddRemoveFireName | ObfuzScope.MethodName); - } - } - - return HasDeclaringOrEnclosingMemberObfuzIgnoreScope(declaringType, ObfuzScope.MethodName); - } - public static bool HasCompilerGeneratedAttribute(IHasCustomAttribute obj) { return obj.CustomAttributes.Find("System.Runtime.CompilerServices.CompilerGeneratedAttribute") != null; diff --git a/com.code-philosophy.obfuz/Editor/Utils/ObfuzIgnoreScopeComputeCache.cs b/com.code-philosophy.obfuz/Editor/Utils/ObfuzIgnoreScopeComputeCache.cs new file mode 100644 index 0000000..519395c --- /dev/null +++ b/com.code-philosophy.obfuz/Editor/Utils/ObfuzIgnoreScopeComputeCache.cs @@ -0,0 +1,172 @@ +using dnlib.DotNet; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Obfuz.Utils +{ + public class ObfuzIgnoreScopeComputeCache + { + private readonly CachedDictionary _selfObfuzIgnoreScopeCache; + private readonly CachedDictionary _enclosingObfuzIgnoreScopeCache; + private readonly CachedDictionary _declaringOrEnclosingMemberObfuzIgnoreScopeCache; + + public ObfuzIgnoreScopeComputeCache() + { + _selfObfuzIgnoreScopeCache = new CachedDictionary(GetObfuzIgnoreScope); + _enclosingObfuzIgnoreScopeCache = new CachedDictionary(GetEnclosingObfuzIgnoreScope); + _declaringOrEnclosingMemberObfuzIgnoreScopeCache = new CachedDictionary(GetDeclaringOrEnclosingMemberObfuzIgnoreScope); + } + + private ObfuzScope? GetObfuzIgnoreScope(IHasCustomAttribute obj) + { + var ca = obj.CustomAttributes.FirstOrDefault(c => c.AttributeType.FullName == "Obfuz.ObfuzIgnoreAttribute"); + if (ca == null) + { + return null; + } + var scope = (ObfuzScope)ca.ConstructorArguments[0].Value; + return scope; + } + + private ObfuzScope? GetEnclosingObfuzIgnoreScope(TypeDef typeDef) + { + TypeDef cur = typeDef.DeclaringType; + while (cur != null) + { + var ca = cur.CustomAttributes?.FirstOrDefault(c => c.AttributeType.FullName == "Obfuz.ObfuzIgnoreAttribute"); + if (ca != null) + { + var scope = (ObfuzScope)ca.ConstructorArguments[0].Value; + CANamedArgument inheritByNestedTypesArg = ca.GetNamedArgument("ApplyToNestedTypes", false); + bool inheritByNestedTypes = inheritByNestedTypesArg == null || (bool)inheritByNestedTypesArg.Value; + return inheritByNestedTypes ? (ObfuzScope?)scope : null; + } + cur = cur.DeclaringType; + } + return null; + } + + private ObfuzScope? GetDeclaringOrEnclosingMemberObfuzIgnoreScope(TypeDef typeDef) + { + TypeDef cur = typeDef; + while (cur != null) + { + var ca = cur.CustomAttributes?.FirstOrDefault(c => c.AttributeType.FullName == "Obfuz.ObfuzIgnoreAttribute"); + if (ca != null) + { + var scope = (ObfuzScope)ca.ConstructorArguments[0].Value; + if (cur != typeDef) + { + CANamedArgument applyToNestedTypesArg = ca.GetNamedArgument("ApplyToNestedTypes", false); + if (applyToNestedTypesArg != null && !(bool)applyToNestedTypesArg.Value) + { + return null; + } + } + return scope; + } + cur = cur.DeclaringType; + } + return null; + } + + private bool HasObfuzIgnoreScope(IHasCustomAttribute obj, ObfuzScope targetScope) + { + ObfuzScope? objScope = _selfObfuzIgnoreScopeCache.GetValue(obj); + return objScope != null && (objScope & targetScope) != 0; + } + + private bool HasEnclosingObfuzIgnoreScope(TypeDef typeDef, ObfuzScope targetScope) + { + ObfuzScope? enclosingScope = _enclosingObfuzIgnoreScopeCache.GetValue(typeDef); + return enclosingScope != null && (enclosingScope & targetScope) != 0; + } + + private bool HasDeclaringOrEnclosingMemberObfuzIgnoreScope(TypeDef typeDef, ObfuzScope targetScope) + { + if (typeDef == null) + { + return false; + } + ObfuzScope? declaringOrEnclosingScope = _declaringOrEnclosingMemberObfuzIgnoreScopeCache.GetValue(typeDef); + return declaringOrEnclosingScope != null && (declaringOrEnclosingScope & targetScope) != 0; + } + + public bool HasSelfOrEnclosingObfuzIgnoreScope(TypeDef typeDef, ObfuzScope targetScope) + { + return HasObfuzIgnoreScope(typeDef, targetScope) || HasEnclosingObfuzIgnoreScope(typeDef, targetScope); + } + + public bool HasSelfOrInheritObfuzIgnoreScope(IHasCustomAttribute obj, TypeDef declaringType, ObfuzScope targetScope) + { + return HasObfuzIgnoreScope(obj, targetScope) || HasDeclaringOrEnclosingMemberObfuzIgnoreScope(declaringType, targetScope); + } + + public bool HasSelfOrInheritPropertyOrEventOrOrTypeDefObfuzIgnoreScope(MethodDef obj, ObfuzScope targetScope) + { + if (HasObfuzIgnoreScope(obj, targetScope)) + { + return true; + } + + TypeDef declaringType = obj.DeclaringType; + + foreach (var propertyDef in declaringType.Properties) + { + if (HasObfuzIgnoreScope(propertyDef, targetScope)) + { + return true; + } + if (propertyDef.GetMethod == obj || propertyDef.SetMethod == obj) + { + return HasObfuzIgnoreScope(propertyDef, targetScope) || HasDeclaringOrEnclosingMemberObfuzIgnoreScope(declaringType, targetScope); + } + } + + foreach (var eventDef in declaringType.Events) + { + if (eventDef.AddMethod == obj || eventDef.RemoveMethod == obj) + { + if (HasObfuzIgnoreScope(eventDef, targetScope)) + { + return true; + } + return HasObfuzIgnoreScope(eventDef, targetScope) || HasDeclaringOrEnclosingMemberObfuzIgnoreScope(declaringType, targetScope); + } + } + + return HasDeclaringOrEnclosingMemberObfuzIgnoreScope(declaringType, targetScope); + } + + public bool HasSelfOrInheritPropertyOrEventOrOrTypeDefIgnoreMethodName(MethodDef obj) + { + if (HasObfuzIgnoreScope(obj, ObfuzScope.MethodName)) + { + return true; + } + + TypeDef declaringType = obj.DeclaringType; + + foreach (var propertyDef in declaringType.Properties) + { + if (propertyDef.GetMethod == obj || propertyDef.SetMethod == obj) + { + return HasSelfOrInheritObfuzIgnoreScope(propertyDef, declaringType, ObfuzScope.PropertyGetterSetterName | ObfuzScope.MethodName); + } + } + + foreach (var eventDef in declaringType.Events) + { + if (eventDef.AddMethod == obj || eventDef.RemoveMethod == obj) + { + return HasSelfOrInheritObfuzIgnoreScope(eventDef, declaringType, ObfuzScope.EventAddRemoveFireName | ObfuzScope.MethodName); + } + } + + return HasDeclaringOrEnclosingMemberObfuzIgnoreScope(declaringType, ObfuzScope.MethodName); + } + } +} diff --git a/com.code-philosophy.obfuz/Editor/Utils/ObfuzIgnoreScopeComputeCache.cs.meta b/com.code-philosophy.obfuz/Editor/Utils/ObfuzIgnoreScopeComputeCache.cs.meta new file mode 100644 index 0000000..fdc7e01 --- /dev/null +++ b/com.code-philosophy.obfuz/Editor/Utils/ObfuzIgnoreScopeComputeCache.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2f64b9a72981c0e45a03501db02e6538 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.code-philosophy.obfuz/Runtime/ObfuzIgnoreAttribute.cs b/com.code-philosophy.obfuz/Runtime/ObfuzIgnoreAttribute.cs index 3464091..74b0a6f 100644 --- a/com.code-philosophy.obfuz/Runtime/ObfuzIgnoreAttribute.cs +++ b/com.code-philosophy.obfuz/Runtime/ObfuzIgnoreAttribute.cs @@ -14,6 +14,8 @@ namespace Obfuz public bool ApplyToNestedTypes { get; set; } = true; + public bool ApplyToChildTypes { get; set; } = false; + public ObfuzIgnoreAttribute(ObfuzScope scope = ObfuzScope.All) { this.Scope = scope;