我们用C#写完代码后,无论想做热更新,还是想加密防破解,都可以把代码编成dll库,然后用第三方工具做混淆
但我们做混淆时要注意,混淆后要unity能识别,正确运行,并且外部也能正常调用,所以思路是只混淆私有函数、私有变量,最好还能混淆函数内的逻辑,目前只找到Dotfuscator4.2破解版本能满足我的需求
1首先我们把dll拖到input里 选中Library,这样会只混淆私有的变量名和方法名
2我们在看下Options,这里是全局设置,我们只开启流程混淆和重命名,选No,其它禁用Yes,其它默认(最后一个string encryption是字符串混淆,跟据需求选择)
3设置重命名排除,设置过Libr