支持多态dll文件结构

main
walon 2025-07-25 20:47:38 +08:00
parent 69b91575db
commit 87f086e310
6 changed files with 38 additions and 1 deletions

View File

@ -5,7 +5,6 @@ using UnityEngine;
namespace Obfuz.Settings
{
[Serializable]
public class AssemblySettings
{

View File

@ -47,6 +47,9 @@ namespace Obfuz.Settings
[Tooltip("garbage code generator settings")]
public GarbageCodeGenerationSettings garbageCodeGenerationSettings;
[Tooltip("polymorphic dll settings")]
public PolymorphicDllSettings polymorphicDllSettings;
public string ObfuzRootDir => $"Library/Obfuz";
public string GetObfuscatedAssemblyOutputPath(BuildTarget target)

View File

@ -41,6 +41,8 @@ namespace Obfuz.Settings
private SerializedProperty _garbageCodeGenerationSettings;
private SerializedProperty _polymorphicDllSettings;
public ObfuzSettingsProvider() : base("Project/Obfuz", SettingsScope.Project)
{
}
@ -78,6 +80,8 @@ namespace Obfuz.Settings
_controlFlowObfusSettings = _serializedObject.FindProperty("controlFlowObfusSettings");
_garbageCodeGenerationSettings = _serializedObject.FindProperty("garbageCodeGenerationSettings");
_polymorphicDllSettings = _serializedObject.FindProperty("polymorphicDllSettings");
}
public override void OnGUI(string searchContext)
@ -107,6 +111,8 @@ namespace Obfuz.Settings
EditorGUILayout.PropertyField(_garbageCodeGenerationSettings);
EditorGUILayout.PropertyField(_polymorphicDllSettings);
if (EditorGUI.EndChangeCheck())
{
_serializedObject.ApplyModifiedProperties();

View File

@ -0,0 +1,18 @@
using System;
using UnityEngine;
namespace Obfuz.Settings
{
[Serializable]
public class PolymorphicDllSettings
{
[Tooltip("enable polymorphic DLL generation")]
public bool enable = true;
[Tooltip("secret key for generating polymorphic DLL source code")]
public string codeGenerationSecretKey = "obfuz-polymorphic-key";
[Tooltip("disable load standard dotnet dll")]
public bool disableLoadStandardDll = false;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ecab9aab707d08949b2d602a4d61084a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.