File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ Obfuz支持Unity 2019+版本,同时也支持团结引擎1.0.0+,能在所有U
1414
1515Obfuz的Unity Package Manager URL安装地址:
1616
17- - gitee ` https://gitee.com/focus-creative-games/obfuz.git?path=Obfuz/Packages/ com.code-philosophy.obfuz `
18- - github ` https://github.com/focus-creative-games/obfuz.git?path=Obfuz/Packages/ com.code-philosophy.obfuz `
17+ - gitee ` https://gitee.com/focus-creative-games/obfuz.git?path=com.code-philosophy.obfuz `
18+ - github ` https://github.com/focus-creative-games/obfuz.git?path=com.code-philosophy.obfuz `
1919
2020打开Unity Package Manager窗口,点击` Add package from URL... ` ,填入以上地址之一即可完成安装。
2121
Original file line number Diff line number Diff line change 22
33Obfuz的Unity Package Manager URL安装地址:
44
5- - gitee ` https://gitee.com/focus-creative-games/obfuz.git?path=Obfuz/Packages/ com.code-philosophy.obfuz `
6- - github ` https://github.com/focus-creative-games/obfuz.git?path=Obfuz/Packages/ com.code-philosophy.obfuz `
5+ - gitee ` https://gitee.com/focus-creative-games/obfuz.git?path=com.code-philosophy.obfuz `
6+ - github ` https://github.com/focus-creative-games/obfuz.git?path=com.code-philosophy.obfuz `
77
88打开Unity Package Manager窗口,点击` Add package from URL... ` ,填入以上地址之一即可完成安装。
99
10- 如果想安装指定版本的Obfuz,可以在URL后添加` #{version} ` ,如` https://gitee.com/focus-creative-games/obfuz.git?path=Obfuz/Packages/ com.code-philosophy.obfuz#v1.0.0-alpha ` 。
10+ 如果想安装指定版本的Obfuz,可以在URL后添加` #{version} ` ,如` https://gitee.com/focus-creative-games/obfuz.git?path=com.code-philosophy.obfuz#v1.0.0-alpha ` 。
1111
1212## 支持的Unity版本与平台
1313
Original file line number Diff line number Diff line change @@ -15,14 +15,42 @@ Obfuz与Unity工作流深度集成,目前会对Unity有一些特殊处理:
1515Obfuz没有处理场景对象上的` UnityEvent ` 字段,因此如果在` Inspector ` 中设置了` UnityEvent ` 类型字段的回调函数,需要禁用这些函数的符号混淆,
1616否则运行时将出现找不到回调函数的错误。
1717
18- ## 对某些元数据禁用符号混淆
18+ ## 解决混淆后反射找不到类型的问题
19+
20+ 主要有两个办法。
21+
22+ ### 对需要反射查找的元数据禁用符号混淆
1923
2024有几种方式:
2125
22261 . [ Obfuscation Pass] ( ./obfuscation-pass ) 中配置对某些元数据禁用` Symbol Obfus ` Pass。
23272 . [ 符号混淆] ( ./symbol-obfuscation ) 的规则文件中配置对某些元数据禁用符号混淆。
24283 . 在代码中给需要禁用符号混淆的元数据上添加` [ObfuzIgnore] ` 特性, 文档[ ObfuzIgnoreAttribute] ( ./obfuzignore ) 。
2529
30+ ### 手动维护原始名称与反射对象的映射关系
31+
32+ 使用类似下面的代码:
33+
34+ ``` csharp
35+
36+ class NotReflectionFind
37+ {
38+ private static readonly Dictionary <string , Type > _types = new Dictionary <string , Type >{
39+ {" A" , typeof (A )},
40+ {" B" , typeof (B )},
41+ // ...
42+
43+ };
44+
45+ public static Type FindType (string name )
46+ {
47+ return _types .TryGetValue (name , out var type ) ? type : null ;
48+ }
49+ }
50+
51+
52+ ```
53+
2654## 解决与Newtonsoft.Json之类序列化库的兼容问题
2755
2856对需要序列化的类型添加` [Serializable] ` 特性可让它们的public字段不被混淆,但他们的public 属性仍然会被混淆。因此如果
You can’t perform that action at this time.
0 commit comments