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 frankmail007 · Dec 16, 2013 at 11:34 AM · securityprotectionsource code

How to protect my project from decompiling?

The Unity3d compile my project into a package which will be later in my platform. Here comes a question. Is it safe? I think there is a possibility to decompile the source from this package. Anyway to protect it? Thanks

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
2

Answer by YoungDeveloper · Dec 16, 2013 at 11:40 AM

Unfortunately you can't, the only way to somehow keep your data save is by using online data streaming, but they are still cached, so its really a pain the the arse. You could use code obfuscation tools, some are even in asset store, they will make the code physically unreadable, but im not sure if it will stay that way after decompression.

I know this one:

http://u3d.as/content/apshai-arts/code-guard/4Le

Comment
Add comment · Show 7 · 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
avatar image YoungDeveloper · Dec 16, 2013 at 12:24 PM 0
Share

Also, i forgot to mention that you can .dll files, but they still can be crackable.

avatar image Landern · Dec 16, 2013 at 02:04 PM 0
Share

If the obfuscation tool does a good job a rena$$anonymous$$g methods and variables etc, it should render decompiled code unreadable(not unbuildable), so while they may get something from the code, this may take a long time to figure out everything. Having methods called A, B, AB, BC, etc, makes thing difficult.

avatar image Bunny83 · Dec 16, 2013 at 02:22 PM 1
Share

Yes, but certain things can't be changed that easily, for example class names since Unity uses the class name in the serialization data. As well as all the callback function names have to stay the same (Update/Awake/Start/OnCollisionEnter/...)

You can of course duplicate the project when finished and run an editor script that renames all script files in Unity (to keep asset links) and refactor all classnames in all scripts.

Also using Coroutines a lot can be frustrating for an attacker since most decompiler can't decompile unitys IEnumerator blocks. However i'm pretty sure there are some that can manage this as well.

avatar image YoungDeveloper · Dec 16, 2013 at 03:12 PM 0
Share

I actually created a question related to security question some time ago. $$anonymous$$ost likely, considering codeguard price, it does not really obfuscates it on lower level, which would prevent it from real hacking. I did quite a research, it turns out, to really obfuscate a code dynamically you need to code a custom compiler which will take your code and then recompile it changing all the data, variables, etc, by implementing complex high end math equations, plus changing stuff to unreadable.

For example, if the hacker will get to your unity build assembler code (even if it will be totally obfuscated), the hacker could still understand something from it because of the function declarations and if else checks, because of them you can see where and what starts and overall script structure. One of the ways to deal with this problem is to get rid of if else and small functions, and ins$$anonymous$$d use single long switch case. From cases run code which is called from other cases, and so on. When the code will be compiled and obfuscated, it will be one big pile of mess, you wont be able to tell where is the start, what is called from where or what is the order.

Of course this is a lot of work, serious game creating companys use recompiler what i mentioned, which can take any script and turn it into complete mess and changing it on lowest level.

So this sure is a very interested topic to talk about.

avatar image frankmail007 · Dec 17, 2013 at 04:13 PM 0
Share

I'm most interested at the dll method. But how to do that in os like iOS ? The shared library is not allowed.

Show more comments

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

21 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

Related Questions

is there a way to secure the .unity3d web player file from downloading? 1 Answer

How do I protect my webplayer from beeing used from other sites? 2 Answers

Protection from Reverse Engineering/Hacking 1 Answer

Source code security 1 Answer

How to protect .assets files 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