mappingFile改为固定位置,与平台无关
parent
6671685893
commit
eb88fd8c61
|
@ -69,7 +69,7 @@ namespace Obfuz
|
|||
backupPlayerScriptAssembliesPath,
|
||||
},
|
||||
ObfuscationRuleFiles = settings.aotRuleFiles.ToList(),
|
||||
mappingXmlPath = settings.GetMappingFile(buildTarget),
|
||||
mappingXmlPath = settings.mappingFile,
|
||||
outputDir = ObfuzSettings.Instance.GetObfuscatedAssemblyOutputDir(buildTarget),
|
||||
};
|
||||
var obfuz = new Obfuscator(opt);
|
||||
|
|
|
@ -29,6 +29,7 @@ namespace Obfuz
|
|||
|
||||
private SerializedObject _serializedObject;
|
||||
private SerializedProperty _enable;
|
||||
private SerializedProperty _mappingFile;
|
||||
private SerializedProperty _aotRuleFiles;
|
||||
private SerializedProperty _hotUpdateRuleFiles;
|
||||
|
||||
|
@ -48,6 +49,7 @@ namespace Obfuz
|
|||
_serializedObject?.Dispose();
|
||||
_serializedObject = new SerializedObject(setting);
|
||||
_enable = _serializedObject.FindProperty("enable");
|
||||
_mappingFile = _serializedObject.FindProperty("mappingFile");
|
||||
_aotRuleFiles = _serializedObject.FindProperty("aotRuleFiles");
|
||||
_hotUpdateRuleFiles = _serializedObject.FindProperty("hotUpdateRuleFiles");
|
||||
}
|
||||
|
@ -70,6 +72,7 @@ namespace Obfuz
|
|||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
EditorGUILayout.PropertyField(_enable);
|
||||
EditorGUILayout.PropertyField(_mappingFile);
|
||||
EditorGUILayout.PropertyField(_aotRuleFiles);
|
||||
EditorGUILayout.PropertyField(_hotUpdateRuleFiles);
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System.IO;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
using UnityEditor;
|
||||
using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
|
@ -11,6 +12,9 @@ namespace Obfuz
|
|||
[Tooltip("enable Obfuz")]
|
||||
public bool enable = true;
|
||||
|
||||
[Tooltip("path of mapping.xml")]
|
||||
public string mappingFile = "Assets/Obfuz/mapping.xml";
|
||||
|
||||
[Tooltip("obfuscation rule files for aot assemblies")]
|
||||
public string[] aotRuleFiles;
|
||||
|
||||
|
@ -19,11 +23,6 @@ namespace Obfuz
|
|||
|
||||
public string ObfuzRootDir => $"Library/Obfuz";
|
||||
|
||||
public string GetMappingFile(BuildTarget target)
|
||||
{
|
||||
return $"{ObfuzRootDir}/{target}/mapping.xml";
|
||||
}
|
||||
|
||||
public string GetObfuscatedAssemblyOutputDir(BuildTarget target)
|
||||
{
|
||||
return $"{ObfuzRootDir}/{target}/ObfuscatedAssemblies";
|
||||
|
|
Loading…
Reference in New Issue