Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by zenforhire · Nov 16, 2014 at 01:26 AM · obfuscation

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

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image tanoshimi · Nov 18, 2014 at 09:35 PM 0
Share

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.

avatar image Kiwasi · Nov 18, 2014 at 10:01 PM 0
Share

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.

avatar image tanoshimi · Nov 18, 2014 at 10:13 PM 2
Share

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 ;)

1 Reply

· Add your reply
  • Sort: 
avatar image
0

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).

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

28 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Practical Obfuscation Experience 3 Answers

Javascript/Unityscript or c# String obfuscator ... 2 Answers

How do I prevent my code to be used in future builds of a project which source code is supposed to be deleted by contract? 0 Answers

Cannot obfuscate class inherited by MonoBehavior 0 Answers

Android obfuscator 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges