Unity 项目加密插件Obfuscator

加密混淆的目的是让不怀好意者更难对你的项目进行逆向工程,我们可以使用Obfuscator 插件.

该插件的好处是与Unity构建过程无缝链接,源文件的内容保持不变,而混淆只针对于已编译的程序集。

插件下载

obfuscator 插件链接:UnityObfuscator插件-Unity3D文档类资源-CSDN下载

一、导入及配置

1.插件版本:Obfuscator 3.9.0+

2.在Unity项目工程文件中导入该插件

3.导入完成后,先把工程项目打包Build出来一遍,会适配Obfuscator插件

4.Build完成后,控制台会显示Obfuscation successful,说明适配已经完成了

在这里插入图片描述

5.在Editor\Beebyte\Obfuscator文件夹目录中会多出了一个ObfuscatorOptions的配置文件 

 在这里插入图片描述

6.选中ObfuscatorOptions文件,在Inspector中可看到它的配置信息面板 

 在这里插入图片描述

二、详细用法解释 

在这里插入图片描述

1.Obfuscation Enabled勾选即启用混淆代码插件
2.Obfuscate development builds 勾选即在Unity Development Builds模式中启用

在这里插入图片描述

 3.混淆所有程序集,由Unity构建过程创建的要模糊化的程序集列表,包含文件扩展名
4.需要混淆的程序集文件名称

在这里插入图片描述

需要混淆代码的部分,包括:类名、方法名、参数、字段、属性、事件 

在这里插入图片描述

5.枚举常量的混淆
6.公开的Mono方法、公开的Mono字段、以及MonoBehaviour类名的混淆,MonoBehaviour类名的混淆目前仅可在PC、Mac、Linux中使用
7.添加Obfuscator版本特性,启用此功能可防止意外地多次混淆相同的DLL。如果你选择通过菜单选项手动混淆dll,特别推荐使用它。

在这里插入图片描述

8.设置混淆的细节级别。在弹出窗口中显示的细节级别。Detailed会将项目的混淆时间增加40%左右 

在这里插入图片描述

9.上面都是一些混淆的属性,包括添加虚假的代码的参数,红圈内两个参数建议填写91和1,混淆的代码会呈现的是“[]”,在视觉上会是看到这种效果: 

在这里插入图片描述

 Add fake code(添加虚假代码):推荐使用,它会复制现有的方法,并以误导人们的方式巧妙地修改副本。虽会增加文件大小和增加混淆构建时间,但不会改变代码流。

10.需要添加跳过混淆的命名空间、类、unity方法

在这里插入图片描述

11.其他参数就不一一列举了,可根据英文意思推断出其用法 

 更深入的用法:(必须懂)

[Skip] 和 [SkipRename]的标注
1.在Unity中若有拖拽赋值的点击事件或Animation Clip方法,该方法需要标注[SkipRename]

 在这里插入图片描述

 2.所有的数据类需要注明[Skip]不然调用不到里面的属性

3.插件不会去混淆Plugins文件夹内的代码,若第三方插件失效的话,看看有没有放置到Plugins文件夹内

4.跳过命名空间递归:

在这里插入图片描述

当勾选时,所有的AAA的子命名空间也会被跳过

在这里插入图片描述

当不勾选时,所有的AAA的子命名空间不会被跳过
在这里插入图片描述

三、反编译工具:ILSpy、DotPeek

GitHub - icsharpcode/ILSpy: .NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
dotPeek: Free .NET Decompiler & Assembly Browser by JetBrains

使用这些工具可对程序进行反编译,查看混淆的效果

淘宝花钱买的最新版!需要的拿去! This asset obfuscates your code to make it harder for bad guys to reverse engineer your projects. Specifically designed for Unity, it seamlessly links in with its build process. The top priority of this package is to work straight out of the box with no extra steps required. While other obfuscators can stop a game from working, Beebyte's obfuscator looks for specific Unity related code that must be protected. The contents of your source files are unchanged, the obfuscation targets the compiled assembly. Features: - Supports IL2CPP - Supports Assembly Definition Files (Unity 2017.3+) - Removes Namespaces without any conflicts - Recognises Unity related code that must not be changed - Renames Classes (including MonoBehaviours) - Renames Methods - Renames Parameters - Renames Fields - Renames Properties - Renames Events - String literal obfuscation - Adds fake methods - Easy and extensive customisation using the Unity inspector window - Consistent name translations are possible across multiple builds and developers - Semantically secure cryptographic naming convention for renamed members The asset works for both Unity Free and Unity Pro version 4.2.0 onwards (including Unity 5 & 2017 & 2018). Build targets include Standalone, Android, iOS, WebGL, UWP. Other platforms are not guaranteed or supported but may become supported at a future date. IL2CPP builds are much harder to reverse engineer but strings and member information (class, method names etc) are visible in the global-metadata.dat file. Obfuscation will apply to this file adding further security. Why not complement your security with the Anti-Cheat Toolkit - a great third party asset. For more information about the Obfuscator, please see the FAQ
This asset obfuscates your code to make it harder for bad guys to reverse engineer your projects. Specifically designed for Unity, it seamlessly links in with its build process. The top priority of this package is to work straight out of the box with no extra steps required. While other obfuscators can stop a game from working, Beebyte's obfuscator looks for specific Unity related code that must be protected. The contents of your source files are unchanged, the obfuscation targets the compiled assembly. Features: - Supports IL2CPP - Supports Assembly Definition Files (Unity 2017.3+) - Removes Namespaces without any conflicts - Recognises Unity related code that must not be changed - Renames Classes (including MonoBehaviours) - Renames Methods - Renames Parameters - Renames Fields - Renames Properties - Renames Events - String literal obfuscation - Adds fake methods - Easy and extensive customisation using the Unity inspector window - Consistent name translations are possible across multiple builds and developers - Semantically secure cryptographic naming convention for renamed members The asset works for both Unity Free and Unity Pro version 4.2.0 onwards (including Unity 5 & 2017 & 2018). Build targets include Standalone, Android, iOS, WebGL, UWP. Other platforms are not guaranteed or supported but may become supported at a future date. IL2CPP builds are much harder to reverse engineer but strings and member information (class, method names etc) are visible in the global-metadata.dat file. Obfuscation will apply to this file adding further security. Why not complement your security with the Anti-Cheat Toolkit - a great third party asset. For more information about the Obfuscator, please see the FAQ
This asset obfuscates your code to make it harder for bad guys to reverse engineer your projects. Specifically designed for Unity, it seamlessly links in with its build process. The top priority of this package is to work straight out of the box with no extra steps required. While other obfuscators can stop a game from working, Beebyte's obfuscator looks for specific Unity related code that must be protected. The contents of your source files are unchanged, the obfuscation targets the compiled assembly. Features: - Supports IL2CPP - Supports Assembly Definition Files (Unity 2017.3+) - Removes Namespaces without any conflicts - Recognises Unity related code that must not be changed - Renames Classes (including MonoBehaviours) - Renames Methods - Renames Parameters - Renames Fields - Renames Properties - Renames Events - String literal obfuscation - Adds fake methods - Easy and extensive customisation using the Unity inspector window - Consistent name translations are possible across multiple builds and developers - Semantically secure cryptographic naming convention for renamed members The asset works for both Unity Free and Unity Pro version 4.2.0 onwards (including Unity 5 & 2017 & 2018). Build targets include Standalone, Android, iOS, WebGL, UWP. Other platforms are not guaranteed or supported but may become supported at a future date. IL2CPP builds are much harder to reverse engineer but strings and member information (class, method names etc) are visible in the global-metadata.dat file. Obfuscation will apply to this file adding further security. Why not complement your security with the Anti-Cheat Toolkit - a great third party asset. For more information about the Obfuscator, please see the FAQ
评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值