- Home /
any tool to obfuscate source code not assemblies?
Hi All,
I see plenty of reference to obfuscating the .NET assemblies. But won't do classes with Monobehavior superclass. Then have to find yet another obfuscator for android builds? Idea is to obfuscate the original source code so it would be scrambled for all ported languages. Separate project with the scrambled code just for production builds.
Can't find any tools to scramble c# source code.
Thanks
Why do you want to "scramble" your source code? Is it to protect sensitive information used in the code? (API keys, patented algorithms etc) Or to prevent hackers from reverse-engineering the code and submitting false high scores to a server? Or to stop your game assets being copied?
It is impossible to 100% protect from any of these risks, but it may be possible to make it more difficult for potential hackers depending on what your perceived risk is.
Note that obfuscating monobehaviour a is difficult due to Unity's method of calling named functions all over the show. You could use a thin layer of monobehaviour to translate your methods to your own class. Then obfuscate that. However it will still be pretty obvious which method is Update and so on.
In my opinion, it is rarely worth the effort to attempt to "obfuscate" game code. If you're dealing with credit card transactions, personal data, or sensitive business data, sure. But not to try to protect your awesum zombie shooting script ;)
Answer by darkhog · Nov 18, 2014 at 09:20 PM
Manual obfuscation would be best for several reasons:
You have complete control over what you obfuscate and how
You can obfuscate things specific to your game that automatic obfuscator may miss
Most obfuscators have deobfuscators as well, manual obfuscation means that anyone who wants to deobfuscate your code will have to do so manually as well
Of course this way of doing things is a big timesink in case of big sources, however you can automate it using tools like sed or awk (there probably is a windows version of those).
Your answer
Follow this Question
Related Questions
Practical Obfuscation Experience 3 Answers
Javascript/Unityscript or c# String obfuscator ... 2 Answers
Cannot obfuscate class inherited by MonoBehavior 0 Answers
Android obfuscator 1 Answer